mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
change the default config path to system config path
This commit is contained in:
parent
769586ef30
commit
a684191cf1
1 changed files with 5 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
#include <QtCore/QJsonArray>
|
#include <QtCore/QJsonArray>
|
||||||
#include <QtCore/QJsonObject>
|
#include <QtCore/QJsonObject>
|
||||||
|
#include <QtCore/QStandardPaths>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
#include "HifiConfigVariantMap.h"
|
#include "HifiConfigVariantMap.h"
|
||||||
|
@ -75,8 +76,10 @@ QVariantMap HifiConfigVariantMap::mergeCLParametersWithJSONConfig(const QStringL
|
||||||
// we have a config file - try and read it
|
// we have a config file - try and read it
|
||||||
configFilePath = argumentList[configIndex + 1];
|
configFilePath = argumentList[configIndex + 1];
|
||||||
} else {
|
} else {
|
||||||
// no config file - try to read a file at resources/config.json
|
// no config file - try to read a file config.json at the system config path
|
||||||
configFilePath = QCoreApplication::applicationDirPath() + "/resources/config.json";
|
configFilePath = QString("%1/%2/%3/config.json").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation),
|
||||||
|
QCoreApplication::organizationName(),
|
||||||
|
QCoreApplication::applicationName());
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile configFile(configFilePath);
|
QFile configFile(configFilePath);
|
||||||
|
|
Loading…
Reference in a new issue