diff options
Diffstat (limited to 'src/lib/corelib/tools/settingsmodel.cpp')
-rw-r--r-- | src/lib/corelib/tools/settingsmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/corelib/tools/settingsmodel.cpp b/src/lib/corelib/tools/settingsmodel.cpp index e3c995db3..4fa0e14da 100644 --- a/src/lib/corelib/tools/settingsmodel.cpp +++ b/src/lib/corelib/tools/settingsmodel.cpp @@ -281,10 +281,10 @@ bool SettingsModel::setData(const QModelIndex &index, const QVariant &value, int const QString valueString = value.toString(); QString *toChange = nullptr; if (index.column() == keyColumn() && !valueString.isEmpty() - && !node->parent->hasDirectChildWithName(valueString) - && !(node->parent->parent == &d->rootNode - && node->parent->name == Internal::StringConstants::profilesSettingsKey() - && valueString == Profile::fallbackName())) { + && !node->parent->hasDirectChildWithName(valueString) + && (node->parent->parent != &d->rootNode + || node->parent->name != Internal::StringConstants::profilesSettingsKey() + || valueString != Profile::fallbackName())) { toChange = &node->name; } else if (index.column() == valueColumn() && valueString != node->value) { toChange = &node->value; |