diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-10-22 12:52:46 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-11-16 08:49:12 +0000 |
commit | 9c321ec34a8c52ce8ae418e962be1b5e7462ccf4 (patch) | |
tree | 68bfeeeda92678b8211ce18ac229ef6d76330db3 /src/compositor/compositor_api/qwaylandsurface.h | |
parent | 79b7925098936ebf3a8e6ca3119256fb4f1a52a9 (diff) |
Add QWaylandSurface::bufferSize and deprecate size
Size is confusingly returning the surface size in buffer coordinates and not
surface coordinates. Create a new property bufferSize and deprecated size in
order to make it less ambiguous.
[ChangeLog][Compositor] QWaylandSurface::size has been deprecated. Use
bufferSize or destinationSize instead.
Change-Id: I7985e4cc1b8d627f922680c1800d2687d710d7b3
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandsurface.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h index 243aebd11..cd08a3d2a 100644 --- a/src/compositor/compositor_api/qwaylandsurface.h +++ b/src/compositor/compositor_api/qwaylandsurface.h @@ -82,7 +82,9 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandSurface : public QWaylandObject Q_DECLARE_PRIVATE(QWaylandSurface) Q_PROPERTY(QWaylandClient *client READ client CONSTANT) Q_PROPERTY(QSize destinationSize READ destinationSize NOTIFY destinationSizeChanged) - Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) // Qt 6: Remove or replace with destinationSize +#if QT_DEPRECATED_SINCE(5, 13) + Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) // Qt 6: Remove +#endif Q_PROPERTY(int bufferScale READ bufferScale NOTIFY bufferScaleChanged) Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged) Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged) @@ -112,7 +114,10 @@ public: bool hasContent() const; QSize destinationSize() const; - QSize size() const; +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED QSize size() const; +#endif + QSize bufferSize() const; int bufferScale() const; Qt::ScreenOrientation contentOrientation() const; @@ -158,7 +163,10 @@ Q_SIGNALS: void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent); void childAdded(QWaylandSurface *child); void destinationSizeChanged(); - void sizeChanged(); +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED void sizeChanged(); +#endif + void bufferSizeChanged(); void bufferScaleChanged(); void offsetForNextFrame(const QPoint &offset); void contentOrientationChanged(); |