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;