mirror of
https://github.com/lubosz/overte.git
synced 2025-04-29 19:23:12 +02:00
handle password setting by not converting to double
This commit is contained in:
parent
21809cc9df
commit
94f30fe4d9
2 changed files with 7 additions and 6 deletions
|
@ -40,8 +40,6 @@ DomainServerSettingsManager::DomainServerSettingsManager() :
|
||||||
void DomainServerSettingsManager::loadSettingsMap(const QStringList& argumentList) {
|
void DomainServerSettingsManager::loadSettingsMap(const QStringList& argumentList) {
|
||||||
_settingsMap = HifiConfigVariantMap::mergeMasterConfigWithUserConfig(argumentList);
|
_settingsMap = HifiConfigVariantMap::mergeMasterConfigWithUserConfig(argumentList);
|
||||||
|
|
||||||
qDebug() << _settingsMap;
|
|
||||||
|
|
||||||
// figure out where we are supposed to persist our settings to
|
// figure out where we are supposed to persist our settings to
|
||||||
_settingsFilepath = HifiConfigVariantMap::userConfigFilepath(argumentList);
|
_settingsFilepath = HifiConfigVariantMap::userConfigFilepath(argumentList);
|
||||||
}
|
}
|
||||||
|
@ -174,8 +172,13 @@ void DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
|
||||||
// this is an empty value, clear it in settings variant so the default is sent
|
// this is an empty value, clear it in settings variant so the default is sent
|
||||||
settingsVariant.remove(key);
|
settingsVariant.remove(key);
|
||||||
} else {
|
} else {
|
||||||
if (groupObject.contains(SETTING_DESCRIPTION_TYPE_KEY)) {
|
QString settingType = groupObject[SETTING_DESCRIPTION_TYPE_KEY].toString();
|
||||||
// for now this means that this is a double, so set it as a double
|
|
||||||
|
const QString INPUT_DOUBLE_TYPE = "double";
|
||||||
|
|
||||||
|
// make sure the resulting json value has the right type
|
||||||
|
|
||||||
|
if (settingType == INPUT_DOUBLE_TYPE) {
|
||||||
settingsVariant[key] = rootValue.toString().toDouble();
|
settingsVariant[key] = rootValue.toString().toDouble();
|
||||||
} else {
|
} else {
|
||||||
settingsVariant[key] = rootValue.toString();
|
settingsVariant[key] = rootValue.toString();
|
||||||
|
|
|
@ -163,8 +163,6 @@ const QVariant* valueForKeyPath(QVariantMap& variantMap, const QString& keyPath)
|
||||||
|
|
||||||
QString firstKey = (dotIndex == -1) ? keyPath : keyPath.mid(0, dotIndex);
|
QString firstKey = (dotIndex == -1) ? keyPath : keyPath.mid(0, dotIndex);
|
||||||
|
|
||||||
qDebug() << "Checking for" << firstKey;
|
|
||||||
|
|
||||||
if (variantMap.contains(firstKey)) {
|
if (variantMap.contains(firstKey)) {
|
||||||
if (dotIndex == -1) {
|
if (dotIndex == -1) {
|
||||||
return &variantMap[firstKey];
|
return &variantMap[firstKey];
|
||||||
|
|
Loading…
Reference in a new issue