Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
0c5dc5a6
Commit
0c5dc5a6
authored
May 08, 2016
by
Hans-Christian Ebke
Browse files
Fixes #46.
parent
6b207ed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/loadWidget/loadWidget.cc
View file @
0c5dc5a6
...
...
@@ -54,6 +54,8 @@
#include
"FileOptionsDialog.hh"
#include
<QFileInfo>
LoadWidget
::
LoadWidget
(
std
::
vector
<
fileTypes
>&
_supportedTypes
,
QWidget
*
parent
)
:
QFileDialog
(
parent
),
loadMode_
(
true
),
...
...
@@ -294,8 +296,7 @@ void LoadWidget::saveFile(){
QString
filename
=
files
[
0
];
//get filename
if
(
!
filename
.
contains
(
"."
,
Qt
::
CaseSensitive
)){
//check for extension
if
(
QFileInfo
(
filename
).
completeSuffix
().
isEmpty
())
{
int
s
=
selectedNameFilter
().
indexOf
(
"*"
)
+
1
;
int
e
=
selectedNameFilter
().
indexOf
(
" "
,
s
);
...
...
@@ -355,11 +356,13 @@ void LoadWidget::saveFile(){
return
;
//abort if users doesn't want to overwrite
}
if
(
pluginForExtension_
.
find
(
fi
.
suffix
()
)
!=
pluginForExtension_
.
end
()
){
const
std
::
map
<
QString
,
int
>::
iterator
saving_plugin
=
pluginForExtension_
.
find
(
fi
.
suffix
()
);
if
(
saving_plugin
!=
pluginForExtension_
.
end
()
){
if
(
ids_
.
size
()
==
1
)
emit
save
(
ids_
[
0
],
filename
,
pluginForExtension_
[
fi
.
suffix
()]
);
emit
save
(
ids_
[
0
],
filename
,
saving_plugin
->
second
);
else
emit
save
(
ids_
,
filename
,
pluginForExtension_
[
fi
.
suffix
()]
);
emit
save
(
ids_
,
filename
,
saving_plugin
->
second
);
}
OpenFlipperSettings
().
setValue
(
"Core/CurrentDir"
,
fi
.
absolutePath
()
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment