diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-12-03 16:12:09 +0200 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-12-04 10:25:05 +0000 |
commit | 4aeb655d161250c317bdb5a6a86e6a6b01ef5685 (patch) | |
tree | fd7aa1e10a3df0470f59a8b8692430a5d5a22705 /src | |
parent | 4fa1ed2dfe7ae42b940d6d28e4c1066853e7768a (diff) | |
download | qtwayland-4aeb655d161250c317bdb5a6a86e6a6b01ef5685.tar.gz |
Fix compilation with gcc 4.8
GCC 4.8 doesn't like QPointers in signal connections.
Also, Default Member Initializers for aggregates
are C++14, so we need to write a constructor to make
a class with DMIs work in C++11.
Change-Id: I567c60a8081fa2f268517ec747bd6534674bcce5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylanddisplay_p.h | 5 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 20 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell_p.h | 6 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv6_p.h | 6 |
4 files changed, 27 insertions, 10 deletions
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h index 0dd8d7af..43ccc0a9 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -195,6 +195,11 @@ private: void requestWaylandSync(); struct Listener { + Listener() = default; + Listener(RegistryListener incomingListener, + void* incomingData) + : listener(incomingListener), data(incomingData) + {} RegistryListener listener = nullptr; void *data = nullptr; }; diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index a5de3a90..77a9247a 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -884,17 +884,17 @@ void QWaylandQuickItem::handleSurfaceChanged() { Q_D(QWaylandQuickItem); if (d->oldSurface) { - disconnect(d->oldSurface, &QWaylandSurface::hasContentChanged, this, &QWaylandQuickItem::surfaceMappedChanged); - disconnect(d->oldSurface, &QWaylandSurface::parentChanged, this, &QWaylandQuickItem::parentChanged); - disconnect(d->oldSurface, &QWaylandSurface::sizeChanged, this, &QWaylandQuickItem::updateSize); - disconnect(d->oldSurface, &QWaylandSurface::bufferScaleChanged, this, &QWaylandQuickItem::updateSize); - disconnect(d->oldSurface, &QWaylandSurface::configure, this, &QWaylandQuickItem::updateBuffer); - disconnect(d->oldSurface, &QWaylandSurface::redraw, this, &QQuickItem::update); - disconnect(d->oldSurface, &QWaylandSurface::childAdded, this, &QWaylandQuickItem::handleSubsurfaceAdded); - disconnect(d->oldSurface, &QWaylandSurface::subsurfacePlaceAbove, this, &QWaylandQuickItem::handlePlaceAbove); - disconnect(d->oldSurface, &QWaylandSurface::subsurfacePlaceBelow, this, &QWaylandQuickItem::handlePlaceBelow); + disconnect(d->oldSurface.data(), &QWaylandSurface::hasContentChanged, this, &QWaylandQuickItem::surfaceMappedChanged); + disconnect(d->oldSurface.data(), &QWaylandSurface::parentChanged, this, &QWaylandQuickItem::parentChanged); + disconnect(d->oldSurface.data(), &QWaylandSurface::sizeChanged, this, &QWaylandQuickItem::updateSize); + disconnect(d->oldSurface.data(), &QWaylandSurface::bufferScaleChanged, this, &QWaylandQuickItem::updateSize); + disconnect(d->oldSurface.data(), &QWaylandSurface::configure, this, &QWaylandQuickItem::updateBuffer); + disconnect(d->oldSurface.data(), &QWaylandSurface::redraw, this, &QQuickItem::update); + disconnect(d->oldSurface.data(), &QWaylandSurface::childAdded, this, &QWaylandQuickItem::handleSubsurfaceAdded); + disconnect(d->oldSurface.data(), &QWaylandSurface::subsurfacePlaceAbove, this, &QWaylandQuickItem::handlePlaceAbove); + disconnect(d->oldSurface.data(), &QWaylandSurface::subsurfacePlaceBelow, this, &QWaylandQuickItem::handlePlaceBelow); #if QT_CONFIG(draganddrop) - disconnect(d->oldSurface, &QWaylandSurface::dragStarted, this, &QWaylandQuickItem::handleDragStarted); + disconnect(d->oldSurface.data(), &QWaylandSurface::dragStarted, this, &QWaylandQuickItem::handleDragStarted); #endif #if QT_CONFIG(im) disconnect(d->oldSurface->inputMethodControl(), &QWaylandInputMethodControl::updateInputMethod, this, &QWaylandQuickItem::updateInputMethod); diff --git a/src/compositor/extensions/qwaylandxdgshell_p.h b/src/compositor/extensions/qwaylandxdgshell_p.h index 5ef8bde3..9d1140fb 100644 --- a/src/compositor/extensions/qwaylandxdgshell_p.h +++ b/src/compositor/extensions/qwaylandxdgshell_p.h @@ -136,6 +136,12 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgToplevelPrivate : public QObjectPri Q_DECLARE_PUBLIC(QWaylandXdgToplevel) public: struct ConfigureEvent { + ConfigureEvent() = default; + ConfigureEvent(const QVector<QWaylandXdgToplevel::State> + &incomingStates, + const QSize &incomingSize, uint incomingSerial) + : states(incomingStates), size(incomingSize), serial(incomingSerial) + { } QVector<QWaylandXdgToplevel::State> states; QSize size = {0, 0}; uint serial = 0; diff --git a/src/compositor/extensions/qwaylandxdgshellv6_p.h b/src/compositor/extensions/qwaylandxdgshellv6_p.h index e763f6ab..adc25cb7 100644 --- a/src/compositor/extensions/qwaylandxdgshellv6_p.h +++ b/src/compositor/extensions/qwaylandxdgshellv6_p.h @@ -135,6 +135,12 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgToplevelV6Private : public QObjectP Q_DECLARE_PUBLIC(QWaylandXdgToplevelV6) public: struct ConfigureEvent { + ConfigureEvent() = default; + ConfigureEvent(const QVector<QWaylandXdgToplevelV6::State> + &incomingStates, + const QSize &incomingSize, uint incomingSerial) + : states(incomingStates), size(incomingSize), serial(incomingSerial) + { } QVector<QWaylandXdgToplevelV6::State> states; QSize size = {0, 0}; uint serial = 0; |