Use GenericConfigLocation instead of ConfigLocation.

They do the same on Unix, but on Windows ConfigLocation is erroneously
pointing to an app-specific directory. Fixed in qtbase 44d48862c0 by
adding GenericConfigLocation for this purpose. Available in Qt 5.2.0 rc1.
This commit is contained in:
David Faure 2013-12-08 13:30:40 +01:00
parent 73e3c4a6ed
commit d944a8f7fe
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ PlatformStatus::PlatformStatus(QObject *parent, const QVariantList &)
findShellPackage(false);
const QString globalrcPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, "kdeglobals");
const QString globalrcPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, "kdeglobals");
connect(KDirWatch::self(), SIGNAL(dirty(QString)), this, SLOT(fileDirtied(QString)));
KDirWatch::self()->addFile(globalrcPath);
}

View File

@ -527,7 +527,7 @@ QScriptValue ScriptEngine::userDataPath(QScriptContext *context, QScriptEngine *
} else if (type.compare("pictures", Qt::CaseInsensitive) == 0) {
location = QStandardPaths::PicturesLocation;
} else if (type.compare("config", Qt::CaseInsensitive) == 0) {
location = QStandardPaths::ConfigLocation;
location = QStandardPaths::GenericConfigLocation;
}
if (context->argumentCount() > 1) {
QString loc = QStandardPaths::writableLocation(location);