From 6c09b9e5530f959eebbe33ba7faa9548d85bd884 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 12 Aug 2015 11:10:27 +0200 Subject: QStandardPaths: on Windows, add APPDIR and APPDIR/data for GenericDataLocation This allows multiple applications installed into the same directory, to share data files without polluting a more global directory like C:/ProgramData. Change-Id: Id5f4f9bc9d2ccb7ec677babcc08c1c5a641178f6 Reviewed-by: Samuel Gaist Reviewed-by: Thiago Macieira --- src/corelib/io/qstandardpaths.cpp | 2 +- src/corelib/io/qstandardpaths_win.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 04848a38e5..8828e09e8f 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -182,7 +182,7 @@ QT_BEGIN_NAMESPACE \li "C:/Users//AppData/Local//cache" \row \li GenericDataLocation \li "~/Library/Application Support", "/Library/Application Support" - \li "C:/Users//AppData/Local", "C:/ProgramData" + \li "C:/Users//AppData/Local", "C:/ProgramData", "", "/data" \row \li RuntimeLocation \li "~/Library/Application Support" \li "C:/Users/" diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index b1d5821a97..0a13f94f05 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -212,10 +212,8 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) } dirs.append(result); #ifndef QT_BOOTSTRAPPED - if (type != GenericDataLocation) { - dirs.append(QCoreApplication::applicationDirPath()); - dirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/data")); - } + dirs.append(QCoreApplication::applicationDirPath()); + dirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/data")); #endif } break; -- cgit v1.2.3