diff options
Diffstat (limited to 'src/gui/application.cpp')
-rw-r--r-- | src/gui/application.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 8f4b3f1ba..6280c04aa 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -128,7 +128,15 @@ Application::Application(int &argc, char **argv) if (!QFileInfo(confDir).exists()) { // Migrate from version <= 2.4 setApplicationName(_theme->appNameGUI()); +#ifndef QT_WARNING_DISABLE_DEPRECATED // Was added in Qt 5.9 +#define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations") +#endif + QT_WARNING_PUSH + QT_WARNING_DISABLE_DEPRECATED + // We need to use the deprecated QDesktopServices::storageLocation because of its Qt4 + // behavior of adding "data" to the path QString oldDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + QT_WARNING_POP setApplicationName(_theme->appName()); if (QFileInfo(oldDir).isDir()) { qCInfo(lcApplication) << "Migrating old config from" << oldDir << "to" << confDir; |