summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/minimal
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-04 00:42:24 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-10-04 00:44:18 +0200
commitd8fc0da235b2bd566b2b6f1e21218afdf2f34eb3 (patch)
treec0ca819521ed6901a83ab476fa822a886691d806 /src/plugins/platforms/minimal
parent3649a6e61d823289d18be19387d7e3923dd90bd0 (diff)
parentcdf0c5905b3477c6cd01c519f883b7bb55447120 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/plugins/platforms/minimal/qminimalintegration.cpp src/plugins/platforms/offscreen/qoffscreenintegration.cpp Change-Id: Ica85deeab5c5038ac004718e25194b1157343480
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