From 622b55e918bfc877c10f8885754b30b593d334a5 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 9 Aug 2019 13:50:59 +0200 Subject: 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 --- tests/auto/compositor/compositor/tst_compositor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/auto/compositor/compositor') diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp index 6a12fef49..28ec6c3e4 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); -- cgit v1.2.3