diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-10-04 00:42:24 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-10-04 00:44:18 +0200 |
commit | d8fc0da235b2bd566b2b6f1e21218afdf2f34eb3 (patch) | |
tree | c0ca819521ed6901a83ab476fa822a886691d806 /src/plugins/platforms/offscreen | |
parent | 3649a6e61d823289d18be19387d7e3923dd90bd0 (diff) | |
parent | cdf0c5905b3477c6cd01c519f883b7bb55447120 (diff) | |
download | qtbase-d8fc0da235b2bd566b2b6f1e21218afdf2f34eb3.tar.gz |
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/offscreen')
-rw-r--r-- | src/plugins/platforms/offscreen/qoffscreenintegration.cpp | 21 | ||||
-rw-r--r-- | src/plugins/platforms/offscreen/qoffscreenintegration.h | 3 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp index aafa90c0fd..76881db6fc 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp @@ -99,18 +99,12 @@ public: QOffscreenIntegration::QOffscreenIntegration() { #if defined(Q_OS_UNIX) - m_eventDispatcher = createUnixEventDispatcher(); #if defined(Q_OS_MAC) m_fontDatabase.reset(new QPlatformFontDatabase()); #else m_fontDatabase.reset(new QGenericUnixFontDatabase()); #endif #elif defined(Q_OS_WIN) -#ifndef Q_OS_WINRT - m_eventDispatcher = new QOffscreenEventDispatcher<QEventDispatcherWin32>(); -#else - m_eventDispatcher = new QOffscreenEventDispatcher<QEventDispatcherWinRT>(); -#endif m_fontDatabase.reset(new QBasicFontDatabase()); #endif @@ -119,7 +113,6 @@ QOffscreenIntegration::QOffscreenIntegration() #endif m_services.reset(new QPlatformServices); - QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher); screenAdded(new QOffscreenScreen); } @@ -149,9 +142,19 @@ QPlatformBackingStore *QOffscreenIntegration::createPlatformBackingStore(QWindow return new QOffscreenBackingStore(window); } -QAbstractEventDispatcher *QOffscreenIntegration::guiThreadEventDispatcher() const +QAbstractEventDispatcher *QOffscreenIntegration::createEventDispatcher() const { - return m_eventDispatcher; +#if defined(Q_OS_UNIX) + return createUnixEventDispatcher(); +#elif defined(Q_OS_WIN) +#ifndef Q_OS_WINRT + return new QOffscreenEventDispatcher<QEventDispatcherWin32>(); +#else // !Q_OS_WINRT + return new QOffscreenEventDispatcher<QEventDispatcherWinRT>(); +#endif // Q_OS_WINRT +#else + return 0; +#endif } QPlatformFontDatabase *QOffscreenIntegration::fontDatabase() const diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.h b/src/plugins/platforms/offscreen/qoffscreenintegration.h index b403ce83b3..c7cdb5fdd6 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration.h +++ b/src/plugins/platforms/offscreen/qoffscreenintegration.h @@ -66,12 +66,11 @@ public: QPlatformServices *services() const; QPlatformFontDatabase *fontDatabase() const; - QAbstractEventDispatcher *guiThreadEventDispatcher() const; + QAbstractEventDispatcher *createEventDispatcher() const; static QOffscreenIntegration *createOffscreenIntegration(); private: - QAbstractEventDispatcher *m_eventDispatcher; QScopedPointer<QPlatformFontDatabase> m_fontDatabase; #ifndef QT_NO_DRAGANDDROP QScopedPointer<QPlatformDrag> m_drag; |