Commit bf75e5c0 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Add GL error handling to welcome page.



Handle the sceneGraphError() so that the application
does not crash.
==[ Subject: One line only short meaningful description for logs ]===|

Change-Id: I04e7e92d78795969f5686709522edfc6004cd932
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 8d6e3d22
......@@ -50,6 +50,7 @@
#include <QDesktopServices>
#include <QPainter>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QCoreApplication>
#include <QDir>
......@@ -116,6 +117,9 @@ signals:
private slots:
void welcomePluginAdded(QObject*);
#if QT_VERSION >= 0x050300
void sceneGraphError(QQuickWindow::SceneGraphError, const QString &message);
#endif
private:
void facilitateQml(QQmlEngine *engine);
......@@ -144,6 +148,10 @@ WelcomeMode::WelcomeMode() :
setContext(Core::Context(Core::Constants::C_WELCOME_MODE));
m_welcomePage = new QQuickView;
#if QT_VERSION >= 0x050300
connect(m_welcomePage, SIGNAL(sceneGraphError(QQuickWindow::SceneGraphError,QString)),
this, SLOT(sceneGraphError(QQuickWindow::SceneGraphError,QString)));
#endif // Qt 5.3
m_welcomePage->setObjectName(QLatin1String("WelcomePage"));
m_welcomePage->setResizeMode(QQuickView::SizeRootObjectToView);
......@@ -187,6 +195,19 @@ WelcomeMode::~WelcomeMode()
delete m_networkAccessManagerFactory;
}
#if QT_VERSION >= 0x050300
void WelcomeMode::sceneGraphError(QQuickWindow::SceneGraphError, const QString &message)
{
QMessageBox *messageBox =
new QMessageBox(QMessageBox::Warning,
tr("Welcome Mode Load Error"), message,
QMessageBox::Close, m_modeWidget);
messageBox->setModal(false);
messageBox->setAttribute(Qt::WA_DeleteOnClose);
messageBox->show();
}
#endif // Qt 5.3
bool sortFunction(Utils::IWelcomePage * a, Utils::IWelcomePage *b)
{
return a->priority() < b->priority();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment