mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +02:00
refuse to update a setting if it is gui only
This commit is contained in:
parent
5afb0792dc
commit
55338a2b0f
1 changed files with 51 additions and 49 deletions
|
@ -258,6 +258,7 @@ bool DomainServerSettingsManager::settingExists(const QString& groupName, const
|
|||
|
||||
void DomainServerSettingsManager::updateSetting(const QString& key, const QJsonValue& newValue, QVariantMap& settingMap,
|
||||
const QJsonObject& settingDescription) {
|
||||
if (!settingDescription[VALUE_GUI_ONLY_FLAG_KEY].toBool()) {
|
||||
if (newValue.isString()) {
|
||||
if (newValue.toString().isEmpty()) {
|
||||
// this is an empty value, clear it in settings variant so the default is sent
|
||||
|
@ -315,6 +316,7 @@ void DomainServerSettingsManager::updateSetting(const QString& key, const QJsonV
|
|||
// TODO: we still need to recurse here with the description in case values in the array have special types
|
||||
settingMap[key] = newValue.toArray().toVariantList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJsonObject& postedObject,
|
||||
|
|
Loading…
Reference in a new issue