If a Wayland protocol deals with regions, they will be exposed as
QRegion objects in public API. Therefore, it makes sense to make
RegionInterface private as it's an implementation detail and it's
not intended to be used in public api.
The corresponding test was dropped because the CompositorInterface
no longer emits a signal to indicate that a wl_region has been created.
It should be also noted that wl_region stuff is already tested via
other means, e.g. surface damage, etc.
The main reason why we have factory methods is that up to some point,
kwayland had its own signal to indicate when globals have to be removed.
Now that all globals add destroy listeners for the wl_display object,
we don't have that signal. Most factory methods are equivalent to doing
new T(display).
Besides adding unnecessary boilerplate code, another reason to get rid
of the factory methods is to reduce the amount of merge conflicts. If
several persons work on implementing wayland protocols at the same time,
sooner or later someone will have to resolve merge conflicts in Display.
libwayland-server allows the wl_display accept client connections on
more than one socket. We currently don't listen on multiple sockets,
but it would be nice if Display supported such operation mode.
Summary:
Destroying the SlideInterface on the server side before the client has a
chance to cleanup results in a protocol error:
wl_display@1: error 0: invalid object 7
Which would terminate the client. If we would not destroy the resource,
but only delete the SlideInterface it could result in heap-use-after-free.
So just don't do anything, the client needs to cleanup which will result
in the SlideInterface being deleted.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1714
Summary:
The destructor was not properly implement. Let's use the generic one
from Resource.
Test case is adjusted to verify that the SlideInterface gets cleaned up.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1713