From 6b86e4d463332fd2a524ffa4e3db6091e4784c4e Mon Sep 17 00:00:00 2001 From: Zach H Date: Thu, 12 May 2022 18:13:49 -0400 Subject: [PATCH] Update configuration path to be backwards compatible (#4620) * Update configuration path to be backwards compatible Windows users have used AppData/Local/Cockatrice, whereas the new system was using AppData/Roaming/Cockatrice. This reverts the behavior in a Qt5/6 way. --- cockatrice/src/settingscache.cpp | 2 +- servatrice/src/settingscache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index 5293c3c3..125a7354 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -18,7 +18,7 @@ QString SettingsCache::getDataPath() if (isPortableBuild) return qApp->applicationDirPath() + "/data"; else - return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation); } QString SettingsCache::getSettingsPath() diff --git a/servatrice/src/settingscache.cpp b/servatrice/src/settingscache.cpp index e606cc2c..59f5afc1 100644 --- a/servatrice/src/settingscache.cpp +++ b/servatrice/src/settingscache.cpp @@ -45,6 +45,6 @@ QString SettingsCache::guessConfigurationPath() return guessFileName; #endif - guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/" + fileName; + guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + fileName; return guessFileName; }