Replace QDesktopServices datalocation with emulated version of it
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 6 Dec 2022 13:07:28 +0000 (14:07 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Thu, 15 Dec 2022 15:58:00 +0000 (16:58 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/accountmanager.cpp

index c8f71dbaabe1e190c26fd76b21d43cb194870b08..9ca69858ef2f315f1771243aae463dd90bae4b72 100644 (file)
@@ -150,7 +150,7 @@ bool AccountManager::restoreFromLegacySettings()
     // then try to load settings from a very old place
     if (settings->childKeys().isEmpty()) {
         // Legacy settings used QDesktopServices to get the location for the config folder in 2.4 and before
-        const auto legacy2_4CfgSettingsLocation = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+        const auto legacy2_4CfgSettingsLocation = QString(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/data"));
         const auto legacy2_4CfgFileParentFolder = legacy2_4CfgSettingsLocation.left(legacy2_4CfgSettingsLocation.lastIndexOf('/'));
 
         // 2.5+ (rest of 2.x series)