summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2021-04-19 20:17:52 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2021-04-20 22:46:54 +0200
commit05eff54d668a70d211557ca491f8785f16cfce72 (patch)
tree830495daa3110eadbfa9a0c2ff73390412083d78
parent8bae441d902f28db2f34a8eafff1d481ebc7d6e6 (diff)
Fix build when xcb_glx_plugin config is disabled
After 7266bd459e7cf8d4f4e3ad67b4ff23dea4fbfd0e QGLXIntegration and QGLXContext are not defined if xcb_glx_plugin is disabled. That will happen e.g. when gles is requested instead of desktop GL. Protect the usage of those symbols in the xcb plugin accordingly. Change-Id: I4bea60787fd3175450de05a8e522ef9c8b438ee7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 89395cb21d..2dd2bcf11f 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -274,6 +274,7 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
return glIntegration->createPlatformOpenGLContext(context);
}
+# if QT_CONFIG(xcb_glx_plugin)
QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const
{
using namespace QNativeInterface::Private;
@@ -282,6 +283,7 @@ QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *v
else
return nullptr;
}
+# endif
#if QT_CONFIG(egl)
QOpenGLContext *QXcbIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index eb58433967..e37ca41e0e 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -57,7 +57,9 @@ class QXcbNativeInterface;
class Q_XCB_EXPORT QXcbIntegration : public QPlatformIntegration
#ifndef QT_NO_OPENGL
+# if QT_CONFIG(xcb_glx_plugin)
, public QNativeInterface::Private::QGLXIntegration
+# endif
# if QT_CONFIG(egl)
, public QNativeInterface::Private::QEGLIntegration
# endif
@@ -72,7 +74,9 @@ public:
QPlatformWindow *createForeignWindow(QWindow *window, WId nativeHandle) const override;
#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
+# if QT_CONFIG(xcb_glx_plugin)
QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const override;
+# endif
# if QT_CONFIG(egl)
QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const override;
# endif