diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2013-10-04 12:12:37 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-10-11 14:13:38 +0200 |
commit | d2b9d5e9cfa7b18902d1211e0541fdf4787aa0ed (patch) | |
tree | 3c9460311869587cd3a6d6373d25875cef4e1488 /src/plugins | |
parent | 184636c72b697b760b081175d8e581718540064a (diff) | |
download | qtwayland-d2b9d5e9cfa7b18902d1211e0541fdf4787aa0ed.tar.gz |
Make the platform plugin compatible with qt 5.2.
Change-Id: Ib81ae383c5ef4baf76f2cfd4bd9efeb749480f4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins')
8 files changed, 15 insertions, 14 deletions
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp index 9862223f..663d18b3 100644 --- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp +++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-brcm-egl.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-brcm-egl.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp index 222cc1e8..e5a0a2c6 100644 --- a/src/plugins/platforms/qwayland-egl/main.cpp +++ b/src/plugins/platforms/qwayland-egl/main.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-egl.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-egl.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); diff --git a/src/plugins/platforms/qwayland-nogl/main.cpp b/src/plugins/platforms/qwayland-nogl/main.cpp index 60693902..d0bdf7f0 100644 --- a/src/plugins/platforms/qwayland-nogl/main.cpp +++ b/src/plugins/platforms/qwayland-nogl/main.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-nogl.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-nogl.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp index 414830ff..0d6bcffe 100644 --- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp +++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-xcomposite-egl.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-egl.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp index d442c819..98ca1384 100644 --- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp +++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.1" FILE "qwayland-xcomposite-glx.json") + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-glx.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); diff --git a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp index 3236aebc..12be111d 100644 --- a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp @@ -129,8 +129,6 @@ QWaylandDisplay::QWaylandDisplay() init(registry); - QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher; - connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(flushRequests())); connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests())); #ifdef QT_WAYLAND_GL_SUPPORT diff --git a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp index b0d5b271..5160d66f 100644 --- a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp @@ -102,7 +102,6 @@ public: QWaylandIntegration::QWaylandIntegration() : mFontDb(new QGenericUnixFontDatabase()) - , mEventDispatcher(createUnixEventDispatcher()) , mNativeInterface(new QWaylandNativeInterface(this)) #ifndef QT_NO_ACCESSIBILITY , mAccessibility(new QPlatformAccessibility()) @@ -110,7 +109,6 @@ QWaylandIntegration::QWaylandIntegration() , mAccessibility(0) #endif { - QGuiApplicationPrivate::instance()->setEventDispatcher(mEventDispatcher); mDisplay = new QWaylandDisplay(); mClipboard = new QWaylandClipboard(mDisplay); mDrag = new QWaylandDrag(mDisplay); @@ -183,9 +181,15 @@ QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow * return new QWaylandShmBackingStore(window); } -QAbstractEventDispatcher *QWaylandIntegration::guiThreadEventDispatcher() const +QAbstractEventDispatcher *QWaylandIntegration::createEventDispatcher() const { - return mEventDispatcher; + return createUnixEventDispatcher(); +} + +void QWaylandIntegration::initialize() +{ + QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher; + QObject::connect(dispatcher, SIGNAL(aboutToBlock()), mDisplay, SLOT(flushRequests())); } QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const diff --git a/src/plugins/platforms/wayland_common/qwaylandintegration.h b/src/plugins/platforms/wayland_common/qwaylandintegration.h index fe9b113e..e9f8b73a 100644 --- a/src/plugins/platforms/wayland_common/qwaylandintegration.h +++ b/src/plugins/platforms/wayland_common/qwaylandintegration.h @@ -48,7 +48,6 @@ QT_BEGIN_NAMESPACE class QWaylandBuffer; class QWaylandDisplay; -class QAbstractEventDispatcher; class QWaylandIntegration : public QPlatformIntegration { @@ -61,7 +60,8 @@ public: QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const; - QAbstractEventDispatcher *guiThreadEventDispatcher() const; + QAbstractEventDispatcher *createEventDispatcher() const; + void initialize(); QPlatformFontDatabase *fontDatabase() const; @@ -87,7 +87,6 @@ public: private: QPlatformFontDatabase *mFontDb; - QAbstractEventDispatcher *mEventDispatcher; QPlatformClipboard *mClipboard; QPlatformDrag *mDrag; QWaylandDisplay *mDisplay; |