summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.h
diff options
context:
space:
mode:
authorSandro Mani <manisandro@gmail.com>2015-02-16 10:22:14 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-02-25 12:14:51 +0000
commitdf39295f23c7d9ead8481a95b9c78caaff1e8bc8 (patch)
treeb1b446c6635886317153fee80e72b89251377722 /src/plugins/platforms/xcb/qxcbintegration.h
parentd56879722618e8b31749aacb78e33a3f215d43f6 (diff)
Have XCB/Windows platform integration classes keep their own instance pointer
Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 0af9df55aa..4212d53810 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -101,6 +101,9 @@ public:
#endif
void sync() Q_DECL_OVERRIDE;
+
+ static QXcbIntegration *instance() { return m_instance; }
+
private:
QList<QXcbConnection *> m_connections;
@@ -120,6 +123,8 @@ private:
mutable QByteArray m_wmClass;
const char *m_instanceName;
bool m_canGrab;
+
+ static QXcbIntegration *m_instance;
};
QT_END_NAMESPACE