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 | 3e74b2df1bff8d34409a3e99422d203ff8d7a4de (patch) | |
tree | d18f825a1afd931cd7722d94fa5ba9b9a701cfde /src/plugins/platforms/wayland/qwaylanddisplay.cpp | |
parent | 9d5774868ae8907ee03e61caa4f265e8d6e58881 (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/qwaylanddisplay.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylanddisplay.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index ca0e6572c..588096933 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -142,6 +142,13 @@ QWaylandDisplay::QWaylandDisplay(void) wl_display_add_global_listener(mDisplay, QWaylandDisplay::displayHandleGlobal, this); + mFd = wl_display_get_fd(mDisplay, sourceUpdate, this); + QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher; + connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(flushRequests())); + + mReadNotifier = new QSocketNotifier(mFd, QSocketNotifier::Read, this); + connect(mReadNotifier, SIGNAL(activated(int)), this, SLOT(readEvents())); + #ifdef QT_WAYLAND_GL_SUPPORT mEglIntegration = QWaylandGLIntegration::createGLIntegration(this); #endif @@ -156,16 +163,6 @@ QWaylandDisplay::QWaylandDisplay(void) mEglIntegration->initialize(); #endif - mFd = wl_display_get_fd(mDisplay, sourceUpdate, this); -} - -void QWaylandDisplay::eventDispatcherCreated(QAbstractEventDispatcher *dispatcher) -{ - connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(flushRequests())); - - mReadNotifier = new QSocketNotifier(mFd, QSocketNotifier::Read, this); - connect(mReadNotifier, SIGNAL(activated(int)), this, SLOT(readEvents())); - waitForScreens(); } |