diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 029a6de17f..2ace68036b 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -119,7 +119,9 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters) QXcbIntegration::~QXcbIntegration() { +#if !defined(QT_NO_OPENGL) && defined(XCB_USE_GLX) qDeleteAll(m_defaultContextInfos); +#endif qDeleteAll(m_connections); } @@ -289,10 +291,14 @@ QPlatformTheme *QXcbIntegration::createPlatformTheme(const QString &name) const */ void QXcbIntegration::removeDefaultOpenGLContextInfo(QXcbScreen *screen) { +#if !defined(QT_NO_OPENGL) && defined(XCB_USE_GLX) if (!m_defaultContextInfos.contains(screen)) return; QOpenGLDefaultContextInfo* info = m_defaultContextInfos.take(screen); delete info; +#else + Q_UNUSED(screen); +#endif } QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 669a0d00f6..c625679f72 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -50,10 +50,10 @@ QT_BEGIN_NAMESPACE class QXcbConnection; class QAbstractEventDispatcher; class QXcbNativeInterface; +class QXcbScreen; #if !defined(QT_NO_OPENGL) && defined(XCB_USE_GLX) class QOpenGLDefaultContextInfo; -class QXcbScreen; #endif class QXcbIntegration : public QPlatformIntegration @@ -97,9 +97,7 @@ public: QStringList themeNames() const; QPlatformTheme *createPlatformTheme(const QString &name) const; -#if !defined(QT_NO_OPENGL) && defined(XCB_USE_GLX) void removeDefaultOpenGLContextInfo(QXcbScreen *screen); -#endif private: QList m_connections;