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