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