forked from qt-creator/qt-creator
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:
@@ -194,10 +194,10 @@ DeviceSettings::DeviceSettings()
|
|||||||
displayName.setValueAcceptor(
|
displayName.setValueAcceptor(
|
||||||
[validateDisplayName](const QString &old,
|
[validateDisplayName](const QString &old,
|
||||||
const QString &newValue) -> std::optional<QString> {
|
const QString &newValue) -> std::optional<QString> {
|
||||||
if (validateDisplayName(old, newValue))
|
if (!validateDisplayName(old, newValue))
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
||||||
return old;
|
return newValue;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user