From 3d52d67096b0b3a427c085e5d84bcf13d16c1086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 5 Oct 2012 20:31:21 +0200 Subject: [PATCH] Compile fix for when XCB_USE_GLX is not defined. Fixes compile failure introduced by 394249616cbb4c0861a032d33f846f. Change-Id: I5794d22ee87eb18c08ea1de227b943f2e675356c Reviewed-by: Thiago Macieira --- src/plugins/platforms/xcb/qxcbintegration.cpp | 6 ++++++ src/plugins/platforms/xcb/qxcbintegration.h | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) 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;