diff options
author | David Faure <david.faure@kdab.com> | 2013-10-31 18:17:44 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 19:08:08 +0100 |
commit | 44d48862c0ff4b67a76734deae5e76f926a77bce (patch) | |
tree | ccfa60682f4975cdbfb0898868515bd134236cac /src/corelib/io/qstandardpaths.cpp | |
parent | ec12d641faaab2758bc2a31f1c106bc8bdf84466 (diff) |
QStandardPaths: add GenericConfigLocation
This is what ConfigLocation was meant to be. A directory shared by all
applications. Unfortunately when I wrote the fallback on Windows,
I picked DataLocation (which is app-specific) instead of
GenericDataLocation (which is shared between apps). This makes it
impossible to have config files shared between apps, e.g. for libraries.
It also makes ConfigLocation quite inconsistent (on Windows one cannot
use it to load another app's config file, while it works everywhere else).
All this is fixed by GenericConfigLocation, which is shared between apps.
Change-Id: I23a755131061d4fea01e13dd1038fbd8ef333a5d
Reviewed-by: Alex Richardson <arichardson.kde@googlemail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 186321db6e..2207b8c43e 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -95,6 +95,9 @@ QT_BEGIN_NAMESPACE files should be written. For instance unix local sockets. \value ConfigLocation Returns a directory location where user-specific configuration files should be written. + \value GenericConfigLocation Returns a directory location where user-specific + configuration files shared between multiple applications should be written. + This is a generic value and the returned path is never empty. \value DownloadLocation Returns a directory for user's downloaded files. @@ -335,6 +338,8 @@ QString QStandardPaths::displayName(StandardLocation type) return QCoreApplication::translate("QStandardPaths", "Runtime"); case ConfigLocation: return QCoreApplication::translate("QStandardPaths", "Configuration"); + case GenericConfigLocation: + return QCoreApplication::translate("QStandardPaths", "Shared Configuration"); case GenericCacheLocation: return QCoreApplication::translate("QStandardPaths", "Shared Cache"); case DownloadLocation: @@ -358,7 +363,7 @@ QString QStandardPaths::displayName(StandardLocation type) or writing to the current user's configuration. This affects the locations into which test programs might write files: - GenericDataLocation, DataLocation, ConfigLocation, + GenericDataLocation, DataLocation, ConfigLocation, GenericConfigLocation, GenericCacheLocation, CacheLocation. Other locations are not affected. |