3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 17:15:37 +02:00

handle password setting by not converting to double

This commit is contained in:
Stephen Birarda 2014-09-26 12:20:12 -07:00
parent 21809cc9df
commit 94f30fe4d9
2 changed files with 7 additions and 6 deletions
domain-server/src
libraries/shared/src

View file

@ -40,8 +40,6 @@ DomainServerSettingsManager::DomainServerSettingsManager() :
void DomainServerSettingsManager::loadSettingsMap(const QStringList& argumentList) {
_settingsMap = HifiConfigVariantMap::mergeMasterConfigWithUserConfig(argumentList);
qDebug() << _settingsMap;
// figure out where we are supposed to persist our settings to
_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
settingsVariant.remove(key);
} else {
if (groupObject.contains(SETTING_DESCRIPTION_TYPE_KEY)) {
// for now this means that this is a double, so set it as a double
QString settingType = groupObject[SETTING_DESCRIPTION_TYPE_KEY].toString();
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();
} else {
settingsVariant[key] = rootValue.toString();

View file

@ -163,8 +163,6 @@ const QVariant* valueForKeyPath(QVariantMap& variantMap, const QString& keyPath)
QString firstKey = (dotIndex == -1) ? keyPath : keyPath.mid(0, dotIndex);
qDebug() << "Checking for" << firstKey;
if (variantMap.contains(firstKey)) {
if (dotIndex == -1) {
return &variantMap[firstKey];