summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.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/windows/qwindowsintegration.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/windows/qwindowsintegration.h')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index 65816b5590..901538fa2e 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -91,7 +91,7 @@ public:
Qt::KeyboardModifiers queryKeyboardModifiers() const Q_DECL_OVERRIDE;
QList<int> possibleKeys(const QKeyEvent *e) const Q_DECL_OVERRIDE;
- static QWindowsIntegration *instance();
+ static QWindowsIntegration *instance() { return m_instance; }
inline void emitScreenAdded(QPlatformScreen *s) { screenAdded(s); }
inline void emitDestroyScreen(QPlatformScreen *s) { destroyScreen(s); }
@@ -104,6 +104,8 @@ public:
private:
QScopedPointer<QWindowsIntegrationPrivate> d;
+
+ static QWindowsIntegration *m_instance;
};
QT_END_NAMESPACE