aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-08-18 15:54:41 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-08-19 13:48:28 +0000
commitc1477c4660b2480d95dab6c084dd38b5a8a972ff (patch)
tree0127264da6620cc1aa6da12fb7e4e601d68b85d3 /tools/qml
parent16916560c13bf4c096461426c37eccbc8841a13c (diff)
qml: Don't build OpenGL support if OpenGL is not available in Qt.
This is an amended backport of change 668ccf18d in dev. Change-Id: I168a4d5a55c34592599a557bef941ce1629c8178 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 0553553e85..06ed37a00e 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -196,7 +196,7 @@ public Q_SLOTS:
exit(2);//Different return code from qFatal
}
}
-#ifdef QT_GUI_LIB
+#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL)
void onOpenGlContextCreated(QOpenGLContext *context);
#endif
};
@@ -218,17 +218,17 @@ 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*)));
}
#else
Q_UNUSED(o)
-#endif // QT_GUI_LIB
+#endif // QT_GUI_LIB && !QT_NO_OPENGL
}
-#ifdef QT_GUI_LIB
+#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL)
void LoadWatcher::onOpenGlContextCreated(QOpenGLContext *context)
{
context->makeCurrent(qobject_cast<QWindow *>(sender()));
@@ -244,7 +244,7 @@ void LoadWatcher::onOpenGlContextCreated(QOpenGLContext *context)
puts(output.constData());
context->doneCurrent();
}
-#endif // QT_GUI_LIB
+#endif // QT_GUI_LIB && !QT_NO_OPENGL
void quietMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const QString &msg)
{