qml: Don't build OpenGL support if OpenGL is not available in Qt.

Change-Id: I66c841778eb0ae662c3951a26665c83e233851b5
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
Robin Burchell 2015-07-28 12:41:46 +00:00
parent 7b8050c0d3
commit 668ccf18dc
1 changed files with 3 additions and 3 deletions

View File

@ -209,7 +209,7 @@ public Q_SLOTS:
//Will be checked before calling exec()
earlyExit = true;
}
#ifdef QT_GUI_LIB
#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL)
void onOpenGlContextCreated(QOpenGLContext *context);
#endif
};
@ -231,7 +231,7 @@ void LoadWatcher::contain(QObject *o, const QUrl &containPath)
void LoadWatcher::checkForWindow(QObject *o)
{
#ifdef QT_GUI_LIB
#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL)
if (verboseMode && o->isWindowType() && o->inherits("QQuickWindow")) {
connect(o, SIGNAL(openglContextCreated(QOpenGLContext*)),
this, SLOT(onOpenGlContextCreated(QOpenGLContext*)));
@ -241,7 +241,7 @@ void LoadWatcher::checkForWindow(QObject *o)
#endif // QT_GUI_LIB
}
#ifdef QT_GUI_LIB
#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL)
void LoadWatcher::onOpenGlContextCreated(QOpenGLContext *context)
{
context->makeCurrent(qobject_cast<QWindow *>(sender()));