aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2015-07-28 12:41:46 +0000
committerRobin Burchell <robin.burchell@viroteck.net>2015-08-17 11:21:37 +0000
commit668ccf18dc8d5ddf403667f19a5b08f2b7c18639 (patch)
tree0641a6affec99281f309ddceeeb57d0df03850a8 /tools
parent7b8050c0d3bc1e4743f5d5a3f6d688ff71ffb5b6 (diff)
qml: Don't build OpenGL support if OpenGL is not available in Qt.
Change-Id: I66c841778eb0ae662c3951a26665c83e233851b5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 206788c061..c2718de240 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -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()));