From e65236f9a78ffd81e36ad870ca4c43b1b8a94004 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 26 Jun 2014 17:28:48 +0200 Subject: [PATCH] QmlDesigner: Fix message box Use QmlDesignerWarning::show instead of own function. Change-Id: I8e14761c7c5534a3f1d9a01250cce1fc2d43d666 Reviewed-by: Tim Jenssen --- .../designercore/exceptions/exception.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp index 2bbdab38423..07fabc3220b 100644 --- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp +++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp @@ -34,18 +34,10 @@ #include #endif -#include - #include #include -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(); -} +#include /*! \defgroup CoreExceptions @@ -163,7 +155,7 @@ QString Exception::description() const void Exception::showException(const QString &title) const { QString composedTitle = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error") : title; - showAsyncWarning(composedTitle, description()); + QmlDesignerWarning::show(composedTitle, description()); } /*!