summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qstandardpaths_android.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2014-04-24 16:32:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-29 12:28:16 +0200
commitf3bc9f5c5cee9dac8a7815c2861a9945b5341390 (patch)
treec7306c4c04013e9290df292cecd5af24c9dcbd90 /src/corelib/io/qstandardpaths_android.cpp
parent32893fa9c45ad1a26a476f43711bdd5e6951e24b (diff)
Add locations AppDataLocation, AppLocalDataLocation to QStandardPaths.
On Windows, DataLocation currently returns the value obtained by passing CSIDL_COMMON_APPDATA to SHGetSpecialFolderPath(). This is the local non-roaming path. For actually storing settings, the roaming path should be used (CSIDL_APPDATA). Introduce new AppDataLocation to return that path and AppLocalDataLocation for the local path and deprecate DataLocation. [ChangeLog][QtCore][QStandardPaths] QStandardPaths now has new enumeration values AppDataLocation, AppLocalDataLocation to be able to differentiate between roaming and local paths on the Windows operating system. DataLocation is deprecated in favor of AppDataLocation. Task-number: QTBUG-38483 Change-Id: Ib1de8c7031a863ed5eac10c747de6f7ff1a090c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_android.cpp')
-rw-r--r--src/corelib/io/qstandardpaths_android.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qstandardpaths_android.cpp b/src/corelib/io/qstandardpaths_android.cpp
index 60b285a3d6..9bd4b4b428 100644
--- a/src/corelib/io/qstandardpaths_android.cpp
+++ b/src/corelib/io/qstandardpaths_android.cpp
@@ -244,7 +244,8 @@ QString QStandardPaths::writableLocation(StandardLocation type)
return getFilesDir() + testDir() + QLatin1String("/settings");
case QStandardPaths::GenericDataLocation:
return getExternalStorageDirectory() + testDir();
- case QStandardPaths::DataLocation:
+ case QStandardPaths::AppDataLocation:
+ case QStandardPaths::AppLocalDataLocation:
return getFilesDir() + testDir();
case QStandardPaths::GenericCacheLocation:
case QStandardPaths::RuntimeLocation:
@@ -301,7 +302,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
<< getExternalFilesDir("DIRECTORY_DOWNLOADS");
}
- if (type == DataLocation) {
+ if (type == AppDataLocation || type == AppLocalDataLocation) {
return QStringList() << writableLocation(type)
<< getExternalFilesDir();
}