QmlDesigner: Fix message box

Use QmlDesignerWarning::show instead of own function.

Change-Id: I8e14761c7c5534a3f1d9a01250cce1fc2d43d666
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
Marco Bubke
2014-06-26 17:28:48 +02:00
parent 0fd7e435ea
commit e65236f9a7

View File

@@ -34,18 +34,10 @@
#include <cxxabi.h> #include <cxxabi.h>
#endif #endif
#include <coreplugin/icore.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QMessageBox> #include <QMessageBox>
static void showAsyncWarning(const QString &title, const QString &desciption) #include <qmldesignerwarning.h>
{
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 \defgroup CoreExceptions
@@ -163,7 +155,7 @@ QString Exception::description() const
void Exception::showException(const QString &title) const void Exception::showException(const QString &title) const
{ {
QString composedTitle = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error") : title; QString composedTitle = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error") : title;
showAsyncWarning(composedTitle, description()); QmlDesignerWarning::show(composedTitle, description());
} }
/*! /*!