mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
fix for default value search
This commit is contained in:
parent
bd68126b19
commit
05cf0142e9
1 changed files with 4 additions and 7 deletions
|
@ -76,7 +76,7 @@ QVariant DomainServerSettingsManager::valueOrDefaultValueForKeyPath(const QStrin
|
||||||
int dotIndex = keyPath.indexOf('.');
|
int dotIndex = keyPath.indexOf('.');
|
||||||
|
|
||||||
QString groupKey = keyPath.mid(0, dotIndex);
|
QString groupKey = keyPath.mid(0, dotIndex);
|
||||||
QString settingKey = keyPath.mid(dotIndex);
|
QString settingKey = keyPath.mid(dotIndex + 1);
|
||||||
|
|
||||||
foreach(const QVariant& group, _descriptionArray.toVariantList()) {
|
foreach(const QVariant& group, _descriptionArray.toVariantList()) {
|
||||||
QVariantMap groupMap = group.toMap();
|
QVariantMap groupMap = group.toMap();
|
||||||
|
@ -88,16 +88,13 @@ QVariant DomainServerSettingsManager::valueOrDefaultValueForKeyPath(const QStrin
|
||||||
return settingMap[SETTING_DEFAULT_KEY];
|
return settingMap[SETTING_DEFAULT_KEY];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return QVariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foundValue) {
|
return QVariant();
|
||||||
return *foundValue;
|
|
||||||
} else {
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SETTINGS_PATH = "/settings.json";
|
const QString SETTINGS_PATH = "/settings.json";
|
||||||
|
|
Loading…
Reference in a new issue