From a887b737efce7e437ffee3d8bb541317fa34c8d4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 10 Mar 2024 21:54:43 +0200 Subject: [PATCH] autotests: Make idle-inhibitor-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 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)