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 <samuel.gaist@edeltech.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
David Faure 2015-08-12 11:10:27 +02:00
parent efa379b9d5
commit 6c09b9e553
2 changed files with 3 additions and 5 deletions

View File

@ -182,7 +182,7 @@ QT_BEGIN_NAMESPACE
\li "C:/Users/<USER>/AppData/Local/<APPNAME>/cache"
\row \li GenericDataLocation
\li "~/Library/Application Support", "/Library/Application Support"
\li "C:/Users/<USER>/AppData/Local", "C:/ProgramData"
\li "C:/Users/<USER>/AppData/Local", "C:/ProgramData", "<APPDIR>", "<APPDIR>/data"
\row \li RuntimeLocation
\li "~/Library/Application Support"
\li "C:/Users/<USER>"

View File

@ -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;