From 7db7cfd85a2aba70fda0c55de5a195b1c8893b49 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 27 Jun 2023 00:36:34 +0800 Subject: [PATCH] fix: config file location under Linux should contain app name --- app/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/settings.cpp b/app/settings.cpp index 0365eaa..6efa3dd 100644 --- a/app/settings.cpp +++ b/app/settings.cpp @@ -106,9 +106,9 @@ Settings::Settings() } #endif // FLAG_PORTABLE_MODE_SUPPORT - // %LOCALAPPDATA% under Windows. if (configPath.isEmpty()) { - configPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); + // %LOCALAPPDATA%\ under Windows, ~/.config/ under Linux. + configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); } m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);