forked from qt-creator/qt-creator
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:
committed by
Thomas Hartmann
parent
2eb3a03fd4
commit
d98725098e
@@ -1075,6 +1075,9 @@ Rectangle {
|
|||||||
|
|
||||||
DSC.TextField {
|
DSC.TextField {
|
||||||
id: overlayTextField
|
id: overlayTextField
|
||||||
|
|
||||||
|
property string previousText
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
leftPadding: root.leftPadding + (overlayIcon.visible ? overlayIcon.width + 8 : 0)
|
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
|
// Revoke active focus from text field by forcing active focus on another item
|
||||||
tableView.forceActiveFocus()
|
tableView.forceActiveFocus()
|
||||||
|
|
||||||
|
if (!result && overlayTextField.previousText !== overlayTextField.text)
|
||||||
if (!result)
|
|
||||||
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
|
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1151,6 +1153,8 @@ Rectangle {
|
|||||||
overlayTextField.text = tableView.model.headerData(section,
|
overlayTextField.text = tableView.model.headerData(section,
|
||||||
orientation,
|
orientation,
|
||||||
CollectionModel.EditRole)
|
CollectionModel.EditRole)
|
||||||
|
overlayTextField.previousText = overlayTextField.text
|
||||||
|
|
||||||
overlayTextField.forceActiveFocus()
|
overlayTextField.forceActiveFocus()
|
||||||
overlayTextField.selectAll()
|
overlayTextField.selectAll()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user