[server] Don't destroy resource from dtor of a Resource sub class
Summary: Not needed as the dtor of the Resource ensures that the wl_resource gets destroyed. Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D1680
This commit is contained in:
parent
a7d5013573
commit
908f86f299
7 changed files with 4 additions and 40 deletions
|
@ -202,13 +202,7 @@ BlurInterface::Private::Private(BlurInterface *q, BlurManagerInterface *c, wl_re
|
|||
{
|
||||
}
|
||||
|
||||
BlurInterface::Private::~Private()
|
||||
{
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
BlurInterface::Private::~Private() = default;
|
||||
|
||||
BlurInterface::BlurInterface(BlurManagerInterface *parent, wl_resource *parentResource)
|
||||
: Resource(new Private(this, parent, parentResource))
|
||||
|
|
|
@ -238,13 +238,7 @@ ContrastInterface::Private::Private(ContrastInterface *q, ContrastManagerInterfa
|
|||
{
|
||||
}
|
||||
|
||||
ContrastInterface::Private::~Private()
|
||||
{
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
ContrastInterface::Private::~Private() = default;
|
||||
|
||||
ContrastInterface::ContrastInterface(ContrastManagerInterface *parent, wl_resource *parentResource)
|
||||
: Resource(new Private(this, parent, parentResource))
|
||||
|
|
|
@ -205,13 +205,7 @@ OutputConfigurationInterface::Private::Private(OutputConfigurationInterface *q,
|
|||
{
|
||||
}
|
||||
|
||||
OutputConfigurationInterface::Private::~Private()
|
||||
{
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
OutputConfigurationInterface::Private::~Private() = default;
|
||||
|
||||
OutputConfigurationInterface::Private *OutputConfigurationInterface::d_func() const
|
||||
{
|
||||
|
|
|
@ -250,10 +250,6 @@ ServerSideDecorationInterface::Private::Private(ServerSideDecorationInterface *q
|
|||
|
||||
ServerSideDecorationInterface::Private::~Private()
|
||||
{
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
s_all.removeAll(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -368,10 +368,6 @@ ShadowInterface::Private::~Private()
|
|||
CURRENT(bottom)
|
||||
CURRENT(bottomLeft)
|
||||
#undef CURRENT
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
ShadowInterface::ShadowInterface(ShadowManagerInterface *parent, wl_resource *parentResource)
|
||||
|
|
|
@ -200,13 +200,7 @@ SlideInterface::Private::Private(SlideInterface *q, SlideManagerInterface *c, wl
|
|||
{
|
||||
}
|
||||
|
||||
SlideInterface::Private::~Private()
|
||||
{
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
SlideInterface::Private::~Private() = default;
|
||||
|
||||
SlideInterface::SlideInterface(SlideManagerInterface *parent, wl_resource *parentResource)
|
||||
: Resource(new Private(this, parent, parentResource))
|
||||
|
|
|
@ -235,10 +235,6 @@ void SurfaceInterface::Private::destroy()
|
|||
if (current.buffer) {
|
||||
current.buffer->unref();
|
||||
}
|
||||
if (resource) {
|
||||
wl_resource_destroy(resource);
|
||||
resource = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void SurfaceInterface::Private::swapStates(State *source, State *target, bool emitChanged)
|
||||
|
|
Loading…
Reference in a new issue