Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
60547969
Commit
60547969
authored
Aug 05, 2014
by
Peng Liu
Browse files
Removed some redundant code. Factored out translations.
parent
8be4a14f
Changes
1
Hide whitespace changes
Inline
Side-by-side
oracle/src/oraclewizard.cpp
View file @
60547969
...
...
@@ -405,25 +405,24 @@ bool SaveSetsPage::validatePage()
QSettings
*
settings
=
new
QSettings
(
this
);
QString
savePath
=
settings
->
value
(
"paths/carddatabase"
).
toString
();
if
(
savePath
.
isEmpty
())
{
QDir
dir
(
dataDir
);
if
(
!
dir
.
exists
())
dir
.
mkpath
(
dataDir
);
QDir
().
mkpath
(
dataDir
);
}
QString
windowName
=
tr
(
"Save card database"
);
QString
fileType
=
tr
(
"XML; card database (*.xml)"
);
do
{
QString
fileName
;
if
(
savePath
.
isEmpty
())
{
if
(
!
defaultPathCheckBox
->
isChecked
())
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save card database"
)
,
dataDir
+
"/cards.xml"
,
tr
(
"XML card database (*.xml)"
)
);
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
windowName
,
dataDir
+
"/cards.xml"
,
fileType
);
else
fileName
=
dataDir
+
"/cards.xml"
;;
settings
->
setValue
(
"paths/carddatabase"
,
fileName
);
}
else
{
if
(
!
defaultPathCheckBox
->
isChecked
())
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save card database"
),
savePath
,
tr
(
"XML card database (*.xml)"
)
);
fileName
=
QFileDialog
::
getSaveFileName
(
this
,
windowName
,
savePath
,
fileType
);
else
fileName
=
savePath
;
savePath
.
clear
();
}
if
(
fileName
.
isEmpty
())
{
return
false
;
...
...
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