Commit 226dac70 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix ownership of SlideInterface

Similar to other interfaces, the lifetime of the SlideInterface should
be bound to the associated resource.
parent 78fd4141
Pipeline #92957 failed with stage
in 2 minutes and 47 seconds
......@@ -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<SlideInterface>(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))
{
}
......
......@@ -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<SlideInterfacePrivate> d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment