From c1477c4660b2480d95dab6c084dd38b5a8a972ff Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 18 Aug 2015 15:54:41 +0200 Subject: 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 --- tools/qml/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') 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(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) { -- cgit v1.2.3