diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index 1bca957979..4d5966d9ca 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -710,7 +710,7 @@ std::unique_ptr createXdgPopupSurface(KWayland::Client::Surface *surfa CreationSetup configureMode = CreationSetup::CreateAndConfigure); std::unique_ptr createXdgToplevelDecorationV1(XdgToplevel *toplevel); -IdleInhibitorV1 *createIdleInhibitorV1(KWayland::Client::Surface *surface); +std::unique_ptr createIdleInhibitorV1(KWayland::Client::Surface *surface); AutoHideScreenEdgeV1 *createAutoHideScreenEdgeV1(KWayland::Client::Surface *surface, uint32_t border); CursorShapeDeviceV1 *createCursorShapeDeviceV1(KWayland::Client::Pointer *pointer); diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index f909a03270..9389d2cf9d 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -1047,7 +1047,7 @@ std::unique_ptr createXdgToplevelDecorationV1(XdgToplev return std::make_unique(manager, toplevel); } -IdleInhibitorV1 *createIdleInhibitorV1(KWayland::Client::Surface *surface) +std::unique_ptr createIdleInhibitorV1(KWayland::Client::Surface *surface) { IdleInhibitManagerV1 *manager = s_waylandConnection.idleInhibitManagerV1; if (!manager) { @@ -1055,7 +1055,7 @@ IdleInhibitorV1 *createIdleInhibitorV1(KWayland::Client::Surface *surface) return nullptr; } - return new IdleInhibitorV1(manager, surface); + return std::make_unique(manager, surface); } AutoHideScreenEdgeV1 *createAutoHideScreenEdgeV1(KWayland::Client::Surface *surface, uint32_t border)