diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-08-19 11:36:27 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-08-19 12:39:31 +0000 |
commit | 8b2ac90bb32653c0084364d248dda19d3a7cacfa (patch) | |
tree | 864448455a17703dbbd1794fe1bb84f52a2ceeda /src | |
parent | c51da3805d6f5f70c2e50f52eabf7043caf4b760 (diff) | |
download | qt-creator-8b2ac90bb32653c0084364d248dda19d3a7cacfa.tar.gz |
QmlDesigner: Open dialog asynchronous
Change-Id: I4229ebb813d09680e6838f90469e7bb95b919f56
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp index cb4b7cfe0a..5f2ccabbb5 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp @@ -183,11 +183,12 @@ void StatesEditorModel::renameState(int internalNodeId, const QString &newName) return; if (newName.isEmpty() ||! m_statesEditorView->validStateName(newName)) { - auto w = Core::AsynchronousMessageBox::warning(tr("Invalid state name"), - newName.isEmpty() ? - tr("The empty string as a name is reserved for the base state.") : - tr("Name already used in another state")); - w->setAttribute(Qt::WA_ShowModal, false); + QTimer::singleShot(0, [newName]{ + auto w = Core::AsynchronousMessageBox::warning(tr("Invalid state name"), + newName.isEmpty() ? + tr("The empty string as a name is reserved for the base state.") : + tr("Name already used in another state")); + }); reset(); } else { m_statesEditorView->renameState(internalNodeId, newName); |