diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-07-27 16:54:53 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-07-28 10:06:11 +0200 |
commit | dfd72c6e6c5aab58bd56c8f7854e94df2230bd8d (patch) | |
tree | 72cd4bc3aca6135e8be267aaa7aedefd04a7d908 /src/plugins/platforms/wayland/qwaylandintegration.cpp | |
parent | b6b853b1b64175c191e776ffbf297bdc9de0a0fd (diff) |
Make QPlatformIntegration not have a factory for eventdispatcher
but rather an accessor for the guiThreadEventDispatcher
Change-Id: I1b9ba14efc9f338c5a67e3e24ddb0caf76c07413
Reviewed-on: http://codereview.qt.nokia.com/2321
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandintegration.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index d3d7edf0f6..eb4503c829 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -51,6 +51,8 @@ #include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h" #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> +#include <QtGui/private/qguiapplication_p.h> + #include <QtGui/QWindowSystemInterface> #include <QtGui/QPlatformCursor> #include <QtGui/QSurfaceFormat> @@ -61,9 +63,11 @@ QWaylandIntegration::QWaylandIntegration() : mFontDb(new QGenericUnixFontDatabase()) - , mDisplay(new QWaylandDisplay()) + , mEventDispatcher(createUnixEventDispatcher()) , mNativeInterface(new QWaylandNativeInterface) { + QGuiApplicationPrivate::instance()->setEventDispatcher(mEventDispatcher); + mDisplay = new QWaylandDisplay(); } QPlatformNativeInterface * QWaylandIntegration::nativeInterface() const @@ -116,11 +120,9 @@ QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow * return new QWaylandShmBackingStore(window); } -QAbstractEventDispatcher *QWaylandIntegration::createEventDispatcher() const +QAbstractEventDispatcher *QWaylandIntegration::guiThreadEventDispatcher() const { - QAbstractEventDispatcher *dispatcher = createUnixEventDispatcher(); - mDisplay->eventDispatcherCreated(dispatcher); - return dispatcher; + return mEventDispatcher; } QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const |