Fix Build Warning

This commit is contained in:
Adrien Faveraux 2020-08-05 14:21:04 +02:00 committed by Vlad Zahorodnii
parent b7bd93c567
commit 23ef883e84
6 changed files with 24 additions and 23 deletions

View file

@ -19,7 +19,7 @@
#include <wayland-client-protocol.h>
#include <errno.h> // For EPROTO
#include <cerrno> // 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) {

View file

@ -89,7 +89,6 @@ private:
QVector<SurfaceInterface *> m_surfaces;
QVector<wl_surface *> m_clientSurfaces;
KeyboardShortcutsInhibitManager *m_inhibitManagerClient = nullptr;
QVector<KeyboardShortcutsInhibitor *> *m_inhibitors;
};
static const QString s_socketName = QStringLiteral("kwin-wayland-server-keyboard-shortcuts-inhibitor-test-0");

View file

@ -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;

View file

@ -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;
};

View file

@ -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<quint32>(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();
}

View file

@ -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)