diff options
-rw-r--r-- | src/plugins/qmldesigner/designercore/exceptions/exception.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp index c00b52f024..29d820683d 100644 --- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp +++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp @@ -39,6 +39,13 @@ #include <QCoreApplication> #include <QMessageBox> +static void showAsyncWarning(const QString &title, const QString &desciption) +{ + QMessageBox *messageBox = new QMessageBox(QMessageBox::Warning, title, desciption, QMessageBox::Ok, Core::ICore::dialogParent()); + messageBox->setAttribute(Qt::WA_DeleteOnClose); + messageBox->setModal(true); + messageBox->show(); +} /*! \defgroup CoreExceptions @@ -156,7 +163,7 @@ QString Exception::description() const void Exception::showException(const QString &title) const { QString t = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error") : title; - QMessageBox::warning(Core::ICore::dialogParent(), t, description()); + showAsyncWarning(t, description()); } /*! |