diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-09-03 09:20:18 +0200 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-10-03 08:38:36 +0200 |
commit | 6e8bef14859836da27c5170aa829bafaf62714ed (patch) | |
tree | 0caffedaf339998f23259dbe11dee00625d8522a /src | |
parent | e2d5331211c8bfa90063e7fc05715c089f7b9ba4 (diff) |
Compositor: Remove QWaylandQuickItem::sizeFollowsSurface
As the TODO says, this can be handled by implicit size instead.
[ChangeLog][Compositor] WaylandQuickItem.sizeFollowsSurface has been
removed since it didn't offer anything not already covered by the
implicit size.
Fixes: QTBUG-68841
Change-Id: I6c4c9975ac245d107665e01690493a4c57dc2ac8
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 37 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.h | 5 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem_p.h | 1 |
3 files changed, 0 insertions, 43 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index 2c8a3fe68..8ae58149e 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -1019,8 +1019,6 @@ void QWaylandQuickItem::updateSize() size = surface()->destinationSize() * d->scaleFactor(); setImplicitSize(size.width(), size.height()); - if (d->sizeFollowsSurface) - setSize(size); } /*! @@ -1118,41 +1116,6 @@ QPointF QWaylandQuickItem::mapFromSurface(const QPointF &point) const return QPointF(point.x() * xScale, point.y() * yScale); } -/*! - * \qmlproperty bool QtWaylandCompositor::WaylandQuickItem::sizeFollowsSurface - * - * This property specifies whether the size of the item should always match - * the size of its surface. - * - * The default is \c true. - */ - -/*! - * \property QWaylandQuickItem::sizeFollowsSurface - * - * This property specifies whether the size of the item should always match - * the size of its surface. - * - * The default is \c true. - */ -bool QWaylandQuickItem::sizeFollowsSurface() const -{ - Q_D(const QWaylandQuickItem); - return d->sizeFollowsSurface; -} - -//TODO: sizeFollowsSurface became obsolete when we added an implementation for -//implicit size. The property is here for compatibility reasons only and should -//be removed or at least default to false in Qt 6. -void QWaylandQuickItem::setSizeFollowsSurface(bool sizeFollowsSurface) -{ - Q_D(QWaylandQuickItem); - if (d->sizeFollowsSurface == sizeFollowsSurface) - return; - d->sizeFollowsSurface = sizeFollowsSurface; - emit sizeFollowsSurfaceChanged(); -} - #if QT_CONFIG(im) QVariant QWaylandQuickItem::inputMethodQuery(Qt::InputMethodQuery query) const { diff --git a/src/compositor/compositor_api/qwaylandquickitem.h b/src/compositor/compositor_api/qwaylandquickitem.h index aaa67807b..922f5bed3 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.h +++ b/src/compositor/compositor_api/qwaylandquickitem.h @@ -68,7 +68,6 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickItem : public QQuickItem Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged) Q_PROPERTY(bool inputEventsEnabled READ inputEventsEnabled WRITE setInputEventsEnabled NOTIFY inputEventsEnabledChanged) Q_PROPERTY(bool focusOnClick READ focusOnClick WRITE setFocusOnClick NOTIFY focusOnClickChanged) - Q_PROPERTY(bool sizeFollowsSurface READ sizeFollowsSurface WRITE setSizeFollowsSurface NOTIFY sizeFollowsSurfaceChanged) Q_PROPERTY(QObject *subsurfaceHandler READ subsurfaceHandler WRITE setSubsurfaceHandler NOTIFY subsurfaceHandlerChanged) Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged) Q_PROPERTY(bool bufferLocked READ isBufferLocked WRITE setBufferLocked NOTIFY bufferLockedChanged) @@ -103,9 +102,6 @@ public: Q_INVOKABLE QPointF mapToSurface(const QPointF &point) const; Q_REVISION(13) Q_INVOKABLE QPointF mapFromSurface(const QPointF &point) const; - bool sizeFollowsSurface() const; - void setSizeFollowsSurface(bool sizeFollowsSurface); - #if QT_CONFIG(im) QVariant inputMethodQuery(Qt::InputMethodQuery query) const override; Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; @@ -184,7 +180,6 @@ Q_SIGNALS: void focusOnClickChanged(); void mouseMove(const QPointF &windowPosition); void mouseRelease(); - void sizeFollowsSurfaceChanged(); void subsurfaceHandlerChanged(); void outputChanged(); void bufferLockedChanged(); diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h index 832272a37..1be2ed8ab 100644 --- a/src/compositor/compositor_api/qwaylandquickitem_p.h +++ b/src/compositor/compositor_api/qwaylandquickitem_p.h @@ -171,7 +171,6 @@ public: bool isDragging = false; bool newTexture = false; bool focusOnClick = true; - bool sizeFollowsSurface = true; bool belowParent = false; QPointF hoverPos; QMatrix4x4 lastMatrix; |