summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/tst_compositor.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-09 13:50:59 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-08-20 11:10:23 +0200
commit622b55e918bfc877c10f8885754b30b593d334a5 (patch)
tree67527424d118e43a077838b9188d5e9372a7d902 /tests/auto/compositor/compositor/tst_compositor.cpp
parentd8b8ecf7281ee34ba4f68283ed7f204b0e2ce3f9 (diff)
Remove usages of deprecated APIs
- Make the code related to deprecated QWaylandWlScaler compile conditionally, only when QWaylandWlScaler is enabled. - Replace the usages of deprecated APIs by the corresponding alternatives. - Fix the tests to compile when the deprecated APIs are disabled. Task-number: QTBUG-76491 Task-number: QTBUG-76541 Change-Id: Ieba98858e970868a2cbc97df2d06bae346e30d7a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'tests/auto/compositor/compositor/tst_compositor.cpp')
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index 6a12fef4..28ec6c3e 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -535,8 +535,13 @@ void tst_WaylandCompositor::mapSurfaceHiDpi()
QObject::connect(waylandSurface, &QWaylandSurface::hasContentChanged, verifyComittedState);
QSignalSpy hasContentSpy(waylandSurface, SIGNAL(hasContentChanged()));
+#if QT_DEPRECATED_SINCE(5, 13)
QObject::connect(waylandSurface, &QWaylandSurface::sizeChanged, verifyComittedState);
QSignalSpy sizeSpy(waylandSurface, SIGNAL(sizeChanged()));
+#endif
+
+ QObject::connect(waylandSurface, &QWaylandSurface::bufferSizeChanged, verifyComittedState);
+ QSignalSpy bufferSizeSpy(waylandSurface, SIGNAL(bufferSizeChanged()));
QObject::connect(waylandSurface, &QWaylandSurface::destinationSizeChanged, verifyComittedState);
QSignalSpy destinationSizeSpy(waylandSurface, SIGNAL(destinationSizeChanged()));
@@ -560,7 +565,10 @@ void tst_WaylandCompositor::mapSurfaceHiDpi()
wl_surface_commit(surface);
QTRY_COMPARE(hasContentSpy.count(), 1);
+#if QT_DEPRECATED_SINCE(5, 13)
QTRY_COMPARE(sizeSpy.count(), 1);
+#endif
+ QTRY_COMPARE(bufferSizeSpy.count(), 1);
QTRY_COMPARE(destinationSizeSpy.count(), 1);
QTRY_COMPARE(bufferScaleSpy.count(), 1);
QTRY_COMPARE(offsetSpy.count(), 1);