From fb672f335a92d793f74b8818bc1067e5c4944155 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 31 Oct 2021 12:37:41 +0200 Subject: [PATCH] Fix ownership of SlideInterface Similar to other interfaces, the lifetime of the SlideInterface should be bound to the associated resource. --- src/wayland/slide_interface.cpp | 7 +++---- src/wayland/slide_interface.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wayland/slide_interface.cpp b/src/wayland/slide_interface.cpp index b77456dd9b..4ba68d847e 100644 --- a/src/wayland/slide_interface.cpp +++ b/src/wayland/slide_interface.cpp @@ -45,7 +45,7 @@ void SlideManagerInterfacePrivate::org_kde_kwin_slide_manager_create(Resource *r return; } - auto slide = new SlideInterface(q, slide_resource); + auto slide = new SlideInterface(slide_resource); SurfaceInterfacePrivate *surfacePrivate = SurfaceInterfacePrivate::get(s); surfacePrivate->setSlide(QPointer(slide)); } @@ -137,9 +137,8 @@ SlideInterfacePrivate::SlideInterfacePrivate(SlideInterface *_q, wl_resource *re { } -SlideInterface::SlideInterface(SlideManagerInterface *manager, wl_resource *resource) - : QObject(manager) - , d(new SlideInterfacePrivate(this, resource)) +SlideInterface::SlideInterface(wl_resource *resource) + : d(new SlideInterfacePrivate(this, resource)) { } diff --git a/src/wayland/slide_interface.h b/src/wayland/slide_interface.h index 941b62fcbb..e8eda061ed 100644 --- a/src/wayland/slide_interface.h +++ b/src/wayland/slide_interface.h @@ -56,7 +56,7 @@ public: qint32 offset() const; private: - explicit SlideInterface(SlideManagerInterface *manager, wl_resource *resource); + explicit SlideInterface(wl_resource *resource); friend class SlideManagerInterfacePrivate; QScopedPointer d;