From b4e2241ded0bc8673095898033d599dcdb9376cc Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 10 Mar 2024 21:45:52 +0200 Subject: [PATCH] autotests: Make factional-scale-v1 factory function return a std::unique_ptr --- autotests/integration/kwin_wayland_test.h | 2 +- autotests/integration/test_helpers.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index d9143c3416..b75092af21 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -698,7 +698,7 @@ std::unique_ptr createInputPanelSurfaceV1 KWayland::Client::Output *output, MockInputMethod::Mode mode); -FractionalScaleV1 *createFractionalScaleV1(KWayland::Client::Surface *surface); +std::unique_ptr createFractionalScaleV1(KWayland::Client::Surface *surface); std::unique_ptr createXdgToplevelSurface(KWayland::Client::Surface *surface); std::unique_ptr createXdgToplevelSurface(KWayland::Client::Surface *surface, CreationSetup configureMode); diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 828f18e680..be53e08748 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -958,13 +958,13 @@ std::unique_ptr createInputPanelSurfaceV1 return s; } -FractionalScaleV1 *createFractionalScaleV1(KWayland::Client::Surface *surface) +std::unique_ptr createFractionalScaleV1(KWayland::Client::Surface *surface) { if (!s_waylandConnection.fractionalScaleManagerV1) { qWarning() << "Unable to create fractional scale surface. The global is not bound"; return nullptr; } - auto scale = new FractionalScaleV1(); + auto scale = std::make_unique(); scale->init(s_waylandConnection.fractionalScaleManagerV1->get_fractional_scale(*surface)); return scale;