diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 0fcdae1c918..7c621775b15 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -194,10 +194,10 @@ DeviceSettings::DeviceSettings() displayName.setValueAcceptor( [validateDisplayName](const QString &old, const QString &newValue) -> std::optional { - if (validateDisplayName(old, newValue)) + if (!validateDisplayName(old, newValue)) return std::nullopt; - return old; + return newValue; }); }