ProjectExplorer: Fix device display name value acceptor

Fixes: QTCREATORBUG-30622
Change-Id: Idac04c9823f5e1136102be3a2ad810a6f782c0fd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Kandeler
2024-04-08 17:05:46 +02:00
parent 7fd42c3e32
commit 7bb017677d

View File

@@ -194,10 +194,10 @@ DeviceSettings::DeviceSettings()
displayName.setValueAcceptor(
[validateDisplayName](const QString &old,
const QString &newValue) -> std::optional<QString> {
if (validateDisplayName(old, newValue))
if (!validateDisplayName(old, newValue))
return std::nullopt;
return old;
return newValue;
});
}