summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/minimal
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/minimal')
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.cpp22
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.h5
2 files changed, 12 insertions, 15 deletions
diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp
index 29bd223f3f..bb2c5f53c3 100644
--- a/src/plugins/platforms/minimal/qminimalintegration.cpp
+++ b/src/plugins/platforms/minimal/qminimalintegration.cpp
@@ -56,16 +56,8 @@
QT_BEGIN_NAMESPACE
-QMinimalIntegration::QMinimalIntegration() :
-#if defined(Q_OS_WINRT)
- m_eventDispatcher(new QEventDispatcherWinRT())
-#elif defined(Q_OS_WIN)
- m_eventDispatcher(new QEventDispatcherWin32())
-#else
- m_eventDispatcher(createUnixEventDispatcher())
-#endif
+QMinimalIntegration::QMinimalIntegration()
{
- QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
QMinimalScreen *mPrimaryScreen = new QMinimalScreen();
mPrimaryScreen->mGeometry = QRect(0, 0, 240, 320);
@@ -97,9 +89,17 @@ QPlatformBackingStore *QMinimalIntegration::createPlatformBackingStore(QWindow *
return new QMinimalBackingStore(window);
}
-QAbstractEventDispatcher *QMinimalIntegration::guiThreadEventDispatcher() const
+QAbstractEventDispatcher *QMinimalIntegration::createEventDispatcher() const
{
- return m_eventDispatcher;
+#ifdef Q_OS_WIN
+#ifndef Q_OS_WINRT
+ return new QEventDispatcherWin32;
+#else // !Q_OS_WINRT
+ return new QEventDispatcherWinRT;
+#endif // Q_OS_WINRT
+#else
+ return createUnixEventDispatcher();
+#endif
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/minimal/qminimalintegration.h b/src/plugins/platforms/minimal/qminimalintegration.h
index ef39e32fa7..7dc01e1d51 100644
--- a/src/plugins/platforms/minimal/qminimalintegration.h
+++ b/src/plugins/platforms/minimal/qminimalintegration.h
@@ -73,10 +73,7 @@ public:
QPlatformWindow *createPlatformWindow(QWindow *window) const;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
- QAbstractEventDispatcher *guiThreadEventDispatcher() const;
-
-private:
- QAbstractEventDispatcher *m_eventDispatcher;
+ QAbstractEventDispatcher *createEventDispatcher() const;
};
QT_END_NAMESPACE