diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-04-24 16:32:49 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-29 12:28:16 +0200 |
commit | f3bc9f5c5cee9dac8a7815c2861a9945b5341390 (patch) | |
tree | c7306c4c04013e9290df292cecd5af24c9dcbd90 /src/corelib/io/qstandardpaths_blackberry.cpp | |
parent | 32893fa9c45ad1a26a476f43711bdd5e6951e24b (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_blackberry.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_blackberry.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qstandardpaths_blackberry.cpp b/src/corelib/io/qstandardpaths_blackberry.cpp index ec2e61bd15..2e9d62cd05 100644 --- a/src/corelib/io/qstandardpaths_blackberry.cpp +++ b/src/corelib/io/qstandardpaths_blackberry.cpp @@ -63,7 +63,8 @@ QString QStandardPaths::writableLocation(StandardLocation type) const QString sharedRoot = sharedDir.absolutePath(); switch (type) { - case DataLocation: + case AppDataLocation: + case AppLocalDataLocation: return QDir::homePath() + testModeInsert(); case DesktopLocation: case HomeLocation: @@ -108,7 +109,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) if (type == FontsLocation) return QStringList(QLatin1String("/base/usr/fonts")); - if (type == DataLocation) + if (type == AppDataLocation || type == AppLocalDataLocation) dirs.append(QDir::homePath() + testModeInsert() + QLatin1String("native/assets")); const QString localDir = writableLocation(type); |