summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/offscreen')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp13
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.h3
2 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
index bce52963df..a1da8e3a16 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
@@ -95,14 +95,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)
- m_eventDispatcher = new QOffscreenEventDispatcher<QEventDispatcherWin32>();
m_fontDatabase.reset(new QBasicFontDatabase());
#endif
@@ -111,7 +109,6 @@ QOffscreenIntegration::QOffscreenIntegration()
#endif
m_services.reset(new QPlatformServices);
- QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
screenAdded(new QOffscreenScreen);
}
@@ -141,9 +138,15 @@ 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)
+ return new QOffscreenEventDispatcher<QEventDispatcherWin32>();
+#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;