diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-03-19 14:48:22 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2019-03-19 13:52:59 +0000 |
commit | c212c3c72c7e775e6a50e519d15d548aefc34e21 (patch) | |
tree | 86d6029954e601de77c4b9260e3751db475d954b | |
parent | fc5cf08ed8c8da8f1f7c3ee497ee4dc68673bcd0 (diff) | |
download | qt-creator-c212c3c72c7e775e6a50e519d15d548aefc34e21.tar.gz |
QmlDesigner: Workaround for regression in Qt
Editing finished is emitted, when we show an error dialog,
and the TextFiled looses focus. Even if the value did not change.
This triggers a second error dialog and hangs on macOS.
This is a regression from Qt 5.11 to Qt 5.12.x.
The workaround is to check for the value change manually.
Task-number: QDS-519
Change-Id: Ie8a3f342bc0b81941d07773d52947ad76ae27205
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 0d2d46f867..26d4c21cc9 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -154,11 +154,17 @@ Rectangle { __panel.visible = false } + property string oldValue + onEditingFinished: { - if (text != delegateStateName) - statesEditorModel.renameState(internalNodeId, text) - } + if (stateNameField.oldValue === stateNameField.text) + return + stateNameField.oldValue = stateNameField.text + + if (stateNameField.text != delegateStateName) + statesEditorModel.renameState(internalNodeId, stateNameField.text) + } } Item { |