diff options
author | Hannah von Reth <hannah.vonreth@kdab.com> | 2017-06-19 11:52:58 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-20 09:00:11 +0000 |
commit | 32e0da45012cfe84250a8617544972f6c4c29447 (patch) | |
tree | 209c28315caaecda4e32daca7afa1c461f938789 /src/corelib/io/qstandardpaths_win.cpp | |
parent | 2b44fb5c629807ba8d22ac5a2c0f9d76bbe5b6c9 (diff) |
Add "<APPDIR>/data/<APPNAME>" to the non Generic paths on Windows
<APPDIR> was initially thought to be app-specific but is in fact
more used as a kind of vendor prefix, where one vendor (e.g. KDE)
can install many applications into the same APPDIR.
[ChangeLog][QtCore][QStandardPaths] On Windows, QStandardPaths
now also looks into "<APPDIR>/data/<APPNAME>" for non-generic paths.
Change-Id: I426d97d61cc229bad0f5a2a4eb061e349de6681e
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_win.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index a64bde6fb4..41fd31df8b 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -218,7 +218,15 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) } #ifndef QT_BOOTSTRAPPED dirs.append(QCoreApplication::applicationDirPath()); - dirs.append(QCoreApplication::applicationDirPath() + QLatin1String("/data")); + const QString dataDir = QCoreApplication::applicationDirPath() + QLatin1String("/data"); + dirs.append(dataDir); + + if (!isGenericConfigLocation(type)) { + QString appDataDir = dataDir; + appendOrganizationAndApp(appDataDir); + if (appDataDir != dataDir) + dirs.append(appDataDir); + } #endif // !QT_BOOTSTRAPPED } // isConfigLocation() |