diff --git a/app/settings.cpp b/app/settings.cpp index 502800b..56e86fd 100644 --- a/app/settings.cpp +++ b/app/settings.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -149,8 +150,11 @@ Settings::Settings() #endif // defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN) if (configPath.isEmpty()) { - // %LOCALAPPDATA%\ under Windows, ~/.config/ under Linux. - configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); + // Should be %LOCALAPPDATA%\ under Windows, ~/.config/ under Linux. + // Sadly is unknown when Settings object is created (it's before the creation + // of QApplication), so we'll need to append the app name manually. + configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) % + QDir::separator() % QLatin1String("Pineapple Pictures"); } m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);