From 8b2ac90bb32653c0084364d248dda19d3a7cacfa Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 19 Aug 2019 11:36:27 +0200 Subject: QmlDesigner: Open dialog asynchronous Change-Id: I4229ebb813d09680e6838f90469e7bb95b919f56 Reviewed-by: Tim Jenssen --- .../qmldesigner/components/stateseditor/stateseditormodel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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); -- cgit v1.2.1