diff --git a/src/wayland/autotests/client/test_error.cpp b/src/wayland/autotests/client/test_error.cpp index fbe98d558f..2641b687dc 100644 --- a/src/wayland/autotests/client/test_error.cpp +++ b/src/wayland/autotests/client/test_error.cpp @@ -19,7 +19,7 @@ #include -#include // For EPROTO +#include // For EPROTO using namespace KWayland::Client; using namespace KWaylandServer; @@ -41,7 +41,6 @@ private: QThread *m_thread = nullptr; EventQueue *m_queue = nullptr; Compositor *m_compositor = nullptr; - Shell *m_shell = nullptr; PlasmaShell *m_plasmaShell = nullptr; }; @@ -102,7 +101,6 @@ void ErrorTest::cleanup() variable = nullptr; \ } CLEANUP(m_plasmaShell) - CLEANUP(m_shell) CLEANUP(m_compositor) CLEANUP(m_queue) if (m_connection) { diff --git a/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp b/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp index 2ed30d9398..292633ff44 100644 --- a/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp +++ b/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp @@ -89,7 +89,6 @@ private: QVector m_surfaces; QVector m_clientSurfaces; KeyboardShortcutsInhibitManager *m_inhibitManagerClient = nullptr; - QVector *m_inhibitors; }; static const QString s_socketName = QStringLiteral("kwin-wayland-server-keyboard-shortcuts-inhibitor-test-0"); diff --git a/src/wayland/blur_interface.cpp b/src/wayland/blur_interface.cpp index fc71ab0e70..3cc3df4edc 100644 --- a/src/wayland/blur_interface.cpp +++ b/src/wayland/blur_interface.cpp @@ -28,8 +28,8 @@ private: static const quint32 s_version; protected: - void org_kde_kwin_blur_manager_create(Resource *resource, uint32_t id, wl_resource *surface); - void org_kde_kwin_blur_manager_unset(Resource *resource, wl_resource *surface); + void org_kde_kwin_blur_manager_create(Resource *resource, uint32_t id, wl_resource *surface) override; + void org_kde_kwin_blur_manager_unset(Resource *resource, wl_resource *surface) override; }; const quint32 BlurManagerInterfacePrivate::s_version = 1; @@ -87,10 +87,10 @@ public: BlurInterface *q; protected: - void org_kde_kwin_blur_destroy_resource(Resource *resource); - void org_kde_kwin_blur_commit(Resource *resource); - void org_kde_kwin_blur_set_region(Resource *resource, wl_resource *region); - void org_kde_kwin_blur_release(Resource *resource); + void org_kde_kwin_blur_destroy_resource(Resource *resource) override; + void org_kde_kwin_blur_commit(Resource *resource) override; + void org_kde_kwin_blur_set_region(Resource *resource, wl_resource *region) override; + void org_kde_kwin_blur_release(Resource *resource) override; }; void BlurInterfacePrivate::org_kde_kwin_blur_commit(Resource *resource) @@ -110,12 +110,12 @@ void BlurInterfacePrivate::org_kde_kwin_blur_set_region(Resource *resource, wl_r } } -void BlurInterfacePrivate::org_kde_kwin_blur_release(QtWaylandServer::org_kde_kwin_blur::Resource *resource) +void BlurInterfacePrivate::org_kde_kwin_blur_release(Resource *resource) { wl_resource_destroy(resource->handle); } -void BlurInterfacePrivate::org_kde_kwin_blur_destroy_resource(QtWaylandServer::org_kde_kwin_blur::Resource *resource) +void BlurInterfacePrivate::org_kde_kwin_blur_destroy_resource(Resource *resource) { Q_UNUSED(resource) delete q; diff --git a/src/wayland/contrast_interface.cpp b/src/wayland/contrast_interface.cpp index a5cdfc72c9..03ee8e3217 100644 --- a/src/wayland/contrast_interface.cpp +++ b/src/wayland/contrast_interface.cpp @@ -18,10 +18,8 @@ namespace KWaylandServer class ContrastManagerInterfacePrivate : public QtWaylandServer::org_kde_kwin_contrast_manager { public: - ContrastManagerInterfacePrivate(ContrastManagerInterface *_q, Display *display); - ~ContrastManagerInterfacePrivate() = default; + ContrastManagerInterfacePrivate(Display *display); private: - ContrastManagerInterface *q; static const quint32 s_version; protected: @@ -31,9 +29,8 @@ protected: const quint32 ContrastManagerInterfacePrivate::s_version = 1; -ContrastManagerInterfacePrivate::ContrastManagerInterfacePrivate(ContrastManagerInterface *_q, Display *display) +ContrastManagerInterfacePrivate::ContrastManagerInterfacePrivate(Display *display) : QtWaylandServer::org_kde_kwin_contrast_manager(*display, s_version) - , q(_q) { } @@ -68,7 +65,7 @@ void ContrastManagerInterfacePrivate::org_kde_kwin_contrast_manager_unset(Resour ContrastManagerInterface::ContrastManagerInterface(Display *display, QObject *parent) : QObject(parent) - , d(new ContrastManagerInterfacePrivate(this, display)) + , d(new ContrastManagerInterfacePrivate(display)) { } @@ -78,7 +75,6 @@ class ContrastInterfacePrivate : public QtWaylandServer::org_kde_kwin_contrast { public: ContrastInterfacePrivate(ContrastInterface *_q, wl_resource *resource); - ~ContrastInterfacePrivate() = default; QRegion pendingRegion; QRegion currentRegion; @@ -88,8 +84,6 @@ public: qreal currentIntensity; qreal pendingSaturation; qreal currentSaturation; - -private: ContrastInterface *q; protected: @@ -100,7 +94,6 @@ protected: void org_kde_kwin_contrast_set_saturation(Resource *resource, wl_fixed_t saturation) override; void org_kde_kwin_contrast_release(Resource *resource) override; void org_kde_kwin_contrast_destroy_resource(Resource *resource) override; - }; diff --git a/src/wayland/plasmavirtualdesktop_interface.cpp b/src/wayland/plasmavirtualdesktop_interface.cpp index d83beb70f6..410228474d 100644 --- a/src/wayland/plasmavirtualdesktop_interface.cpp +++ b/src/wayland/plasmavirtualdesktop_interface.cpp @@ -85,11 +85,13 @@ void PlasmaVirtualDesktopManagementInterfacePrivate::org_kde_plasma_virtual_desk void PlasmaVirtualDesktopManagementInterfacePrivate::org_kde_plasma_virtual_desktop_management_request_create_virtual_desktop(Resource *resource, const QString &name, uint32_t position) { + Q_UNUSED(resource) emit q->desktopCreateRequested(name, qBound(0, position, (quint32)desktops.count())); } void PlasmaVirtualDesktopManagementInterfacePrivate::org_kde_plasma_virtual_desktop_management_request_remove_virtual_desktop(Resource *resource, const QString &desktop_id) { + Q_UNUSED(resource) emit q->desktopRemoveRequested(desktop_id); } @@ -220,6 +222,7 @@ void PlasmaVirtualDesktopManagementInterface::sendDone() void PlasmaVirtualDesktopInterfacePrivate::org_kde_plasma_virtual_desktop_request_activate(Resource *resource) { + Q_UNUSED(resource) emit q->activateRequested(); } diff --git a/src/wayland/server/pointergestures_interface_v1.cpp b/src/wayland/server/pointergestures_interface_v1.cpp index a1dfb1776c..56b3e097f8 100644 --- a/src/wayland/server/pointergestures_interface_v1.cpp +++ b/src/wayland/server/pointergestures_interface_v1.cpp @@ -30,6 +30,7 @@ private: static void getSwipeGestureCallback(wl_client *client, wl_resource *resource, uint32_t id, wl_resource * pointer); static void getPinchGestureCallback(wl_client *client, wl_resource *resource, uint32_t id, wl_resource * pointer); + static void releaseCallback(wl_client *client, wl_resource *resource); PointerGesturesUnstableV1Interface *q; static const struct zwp_pointer_gestures_v1_interface s_interface; @@ -41,7 +42,8 @@ const quint32 PointerGesturesUnstableV1Interface::Private::s_version = 1; #ifndef K_DOXYGEN const struct zwp_pointer_gestures_v1_interface PointerGesturesUnstableV1Interface::Private::s_interface = { getSwipeGestureCallback, - getPinchGestureCallback + getPinchGestureCallback, + releaseCallback }; #endif @@ -71,6 +73,12 @@ void PointerGesturesUnstableV1Interface::Private::getPinchGestureCallback(wl_cli p->d_func()->registerPinchGesture(g); } +void PointerGesturesUnstableV1Interface::Private::releaseCallback(wl_client *client, wl_resource *resource) +{ + Q_UNUSED(client) + wl_resource_destroy(resource); +} + PointerGesturesUnstableV1Interface::Private::Private(PointerGesturesUnstableV1Interface *q, Display *d) : PointerGesturesInterface::Private(PointerGesturesInterfaceVersion::UnstableV1, q, d, &zwp_pointer_gestures_v1_interface, s_version) , q(q)