QmlDesigner: Hide warning when name not modified

Change-Id: I6f52375d029e575582dc8f16abc50c15727bf287
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit ec7cd3051a)
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Henning Gruendl
2025-04-03 12:16:20 +02:00
committed by Thomas Hartmann
parent 2eb3a03fd4
commit d98725098e

View File

@@ -1075,6 +1075,9 @@ Rectangle {
DSC.TextField {
id: overlayTextField
property string previousText
anchors.fill: parent
leftPadding: root.leftPadding + (overlayIcon.visible ? overlayIcon.width + 8 : 0)
@@ -1095,8 +1098,7 @@ Rectangle {
// Revoke active focus from text field by forcing active focus on another item
tableView.forceActiveFocus()
if (!result)
if (!result && overlayTextField.previousText !== overlayTextField.text)
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
}
@@ -1151,6 +1153,8 @@ Rectangle {
overlayTextField.text = tableView.model.headerData(section,
orientation,
CollectionModel.EditRole)
overlayTextField.previousText = overlayTextField.text
overlayTextField.forceActiveFocus()
overlayTextField.selectAll()
}