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
a903c231
Commit
a903c231
authored
Jun 20, 2014
by
Mark Morschhäuser
Browse files
Qt5: QDesktopServices::storageLocation deprecated
parent
648a6a38
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/main.cpp
View file @
a903c231
...
...
@@ -120,7 +120,11 @@ int main(int argc, char *argv[])
qsrand
(
QDateTime
::
currentDateTime
().
toTime_t
());
bool
startMainProgram
=
true
;
#if QT_VERSION < 0x050000
const
QString
dataDir
=
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
);
#else
const
QString
dataDir
=
QStandardPaths
::
standardLocations
(
QStandardPaths
::
DataLocation
)).
toString
();
#endif
if
(
!
db
->
getLoadSuccess
())
if
(
db
->
loadCardDatabase
(
dataDir
+
"/cards.xml"
))
settingsCache
->
setCardDatabasePath
(
dataDir
+
"/cards.xml"
);
...
...
oracle/src/window_main.cpp
View file @
a903c231
...
...
@@ -24,7 +24,11 @@ const QString WindowMain::defaultSetsUrl = QString("http://www.woogerworks.com/f
WindowMain
::
WindowMain
(
QWidget
*
parent
)
:
QMainWindow
(
parent
)
{
#if QT_VERSION < 0x050000
importer
=
new
OracleImporter
(
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
),
this
);
#else
importer
=
new
OracleImporter
(
QStandardPaths
::
standardLocations
(
QStandardPaths
::
DataLocation
)).
toString
(),
this
);
#endif
nam
=
new
QNetworkAccessManager
(
this
);
checkBoxLayout
=
new
QVBoxLayout
;
...
...
@@ -176,7 +180,11 @@ void WindowMain::updateTotalProgress(int cardsImported, int setIndex, const QStr
if
(
nextSetName
.
isEmpty
())
{
QMessageBox
::
information
(
this
,
tr
(
"Oracle importer"
),
tr
(
"Import finished: %1 cards."
).
arg
(
importer
->
getCardList
().
size
()));
bool
ok
=
false
;
#if QT_VERSION < 0x050000
const
QString
dataDir
=
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
);
#else
const
QString
dataDir
=
QStandardPaths
::
standardLocations
(
QStandardPaths
::
DataLocation
)).
toString
();
#endif
QDir
dir
(
dataDir
);
if
(
!
dir
.
exists
())
dir
.
mkpath
(
dataDir
);
...
...
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