From 44d48862c0ff4b67a76734deae5e76f926a77bce Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 31 Oct 2013 18:17:44 +0100 Subject: 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 Reviewed-by: Thiago Macieira --- src/corelib/io/qstandardpaths_mac.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/io/qstandardpaths_mac.cpp') diff --git a/src/corelib/io/qstandardpaths_mac.cpp b/src/corelib/io/qstandardpaths_mac.cpp index 6744bfeab4..0efdfae253 100644 --- a/src/corelib/io/qstandardpaths_mac.cpp +++ b/src/corelib/io/qstandardpaths_mac.cpp @@ -58,6 +58,7 @@ OSType translateLocation(QStandardPaths::StandardLocation type) { switch (type) { case QStandardPaths::ConfigLocation: + case QStandardPaths::GenericConfigLocation: return kPreferencesFolderType; case QStandardPaths::DesktopLocation: return kDesktopFolderType; @@ -149,6 +150,7 @@ QString QStandardPaths::writableLocation(StandardLocation type) if (type == CacheLocation) appendOrganizationAndApp(path); return path; + case GenericConfigLocation: case ConfigLocation: return qttestDir + QLatin1String("/Preferences"); default: -- cgit v1.2.3