change the default config path to system config path

This commit is contained in:
Stephen Birarda 2014-09-25 14:50:07 -07:00
parent 769586ef30
commit a684191cf1

View file

@ -15,6 +15,7 @@
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonObject>
#include <QtCore/QStandardPaths>
#include <QtCore/QVariant>
#include "HifiConfigVariantMap.h"
@ -75,8 +76,10 @@ QVariantMap HifiConfigVariantMap::mergeCLParametersWithJSONConfig(const QStringL
// we have a config file - try and read it
configFilePath = argumentList[configIndex + 1];
} else {
// no config file - try to read a file at resources/config.json
configFilePath = QCoreApplication::applicationDirPath() + "/resources/config.json";
// no config file - try to read a file config.json at the system config path
configFilePath = QString("%1/%2/%3/config.json").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation),
QCoreApplication::organizationName(),
QCoreApplication::applicationName());
}
QFile configFile(configFilePath);