Fix ownership of SlideInterface
Similar to other interfaces, the lifetime of the SlideInterface should be bound to the associated resource.
This commit is contained in:
parent
12946a9ec9
commit
fb672f335a
2 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue