Commit 555ef7f1 authored by Martin Flöser's avatar Martin Flöser
Browse files

[server] Properly handle destructor in SlideInterface

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
parent 1f48daea
......@@ -170,6 +170,12 @@ void TestSlide::testCreate()
QVERIFY(slideChanged.wait());
QCOMPARE(serverSurface->slideOnShowHide()->location(), KWayland::Server::SlideInterface::Location::Top);
QCOMPARE(serverSurface->slideOnShowHide()->offset(), 15);
// and destroy
QSignalSpy destroyedSpy(serverSurface->slideOnShowHide(), &QObject::destroyed);
QVERIFY(destroyedSpy.isValid());
delete slide;
QVERIFY(destroyedSpy.wait());
}
QTEST_GUILESS_MAIN(TestSlide)
......
......@@ -148,7 +148,6 @@ private:
static void commitCallback(wl_client *client, wl_resource *resource);
static void setLocationCallback(wl_client *client, wl_resource *resource, uint32_t location);
static void setOffsetCallback(wl_client *client, wl_resource *resource, int32_t offset);
static void releaseCallback(wl_client *client, wl_resource *resource);
SlideInterface *q_func() {
return reinterpret_cast<SlideInterface *>(q);
......@@ -162,7 +161,7 @@ const struct org_kde_kwin_slide_interface SlideInterface::Private::s_interface =
commitCallback,
setLocationCallback,
setOffsetCallback,
releaseCallback
resourceDestroyedCallback
};
#endif
......@@ -188,13 +187,6 @@ void SlideInterface::Private::setOffsetCallback(wl_client *client, wl_resource *
p->pendingOffset = offset;
}
void SlideInterface::Private::releaseCallback(wl_client *client, wl_resource *resource)
{
Q_UNUSED(client)
Q_UNUSED(resource)
// TODO: implement
}
SlideInterface::Private::Private(SlideInterface *q, SlideManagerInterface *c, wl_resource *parentResource)
: Resource::Private(q, c, parentResource, &org_kde_kwin_slide_interface, &s_interface)
{
......
Supports Markdown
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