build: Add -Wno-unused-parameter compiler option

Due to being a compositor, kwin has to conform to some certain
interfaces. It means a lot of virtual functions and function tables to
integrate with C APIs. Naturally, we not always want to use every
argument in such functions.

Since we get -Wunused-parameter from -Wall, we have to plumb those
unused arguments in order to suppress compiler warnings at the moment.

However, I don't think that extra work is worth it. We cannot change or
alter prototypes in any way to fix the warning the desired way. Q_UNUSED
and similar macros are not good indicators of whether an argument is
used too, we tend to overlook putting or removing those macros. I've
also noticed that Q_UNUSED are not used to guide us with the removal no
longer needed parameters.

Therefore, I think it's worth adding -Wno-unused-parameter compiler
option to stop the compiler producing warnings about unused parameters.
It changes nothing except that we don't need to put Q_UNUSED anymore,
which can be really cumbersome sometimes. Note that it doesn't affect
unused variables, you'll still get a -Wunused-variable compiler warning
if a variable is unused.
This commit is contained in:
Vlad Zahorodnii 2022-10-28 11:33:51 +03:00
parent c308a262be
commit 7fffe99328
210 changed files with 21 additions and 1039 deletions

View file

@ -14,6 +14,7 @@ find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(GenerateExportHeader)
include(CheckCXXCompilerFlag)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
@ -441,6 +442,11 @@ include_directories(BEFORE
${CMAKE_CURRENT_SOURCE_DIR}/src/colors
)
check_cxx_compiler_flag(-Wno-unused-parameter COMPILER_UNUSED_PARAMETER_SUPPORTED)
if (COMPILER_UNUSED_PARAMETER_SUPPORTED)
add_compile_options(-Wno-unused-parameter)
endif()
if (KF5DocTools_FOUND)
add_subdirectory(doc)
endif()

View file

@ -332,15 +332,12 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)
int drmHandleEvent(int fd, drmEventContextPtr evctx)
{
GPU(fd, -EINVAL);
// TODO ?
Q_UNUSED(evctx)
return -(errno = ENOTSUP);
}
int drmIoctl(int fd, unsigned long request, void *arg)
{
GPU(fd, -EINVAL);
Q_UNUSED(arg);
if (request == DRM_IOCTL_MODE_CREATE_DUMB) {
auto args = static_cast<drm_mode_create_dumb*>(arg);
auto dumb = std::make_shared<MockDumbBuffer>(gpu, args->width, args->height, args->bpp);
@ -419,10 +416,6 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
uint32_t *buf_id)
{
Q_UNUSED(depth)
Q_UNUSED(bpp)
Q_UNUSED(pitch)
Q_UNUSED(bo_handle)
GPU(fd, EINVAL)
auto fb = new MockFb(gpu, width, height);
*buf_id = fb->id;
@ -434,11 +427,6 @@ int drmModeAddFB2(int fd, uint32_t width, uint32_t height,
const uint32_t pitches[4], const uint32_t offsets[4],
uint32_t *buf_id, uint32_t flags)
{
Q_UNUSED(pixel_format)
Q_UNUSED(bo_handles)
Q_UNUSED(pitches)
Q_UNUSED(offsets)
Q_UNUSED(flags)
GPU(fd, EINVAL)
auto fb = new MockFb(gpu, width, height);
*buf_id = fb->id;
@ -451,12 +439,6 @@ int drmModeAddFB2WithModifiers(int fd, uint32_t width, uint32_t height,
const uint64_t modifier[4], uint32_t *buf_id,
uint32_t flags)
{
Q_UNUSED(pixel_format)
Q_UNUSED(bo_handles)
Q_UNUSED(pitches)
Q_UNUSED(offsets)
Q_UNUSED(modifier)
Q_UNUSED(flags)
GPU(fd, EINVAL)
if (!gpu->deviceCaps.contains(DRM_CAP_ADDFB2_MODIFIERS)) {
return -(errno = ENOTSUP);
@ -605,13 +587,6 @@ int drmModeSetCursor(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width
int drmModeSetCursor2(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height, int32_t hot_x, int32_t hot_y)
{
GPU(fd, -EINVAL);
// TODO ?
Q_UNUSED(crtcId)
Q_UNUSED(bo_handle)
Q_UNUSED(width)
Q_UNUSED(height)
Q_UNUSED(hot_x)
Q_UNUSED(hot_y)
return -(errno = ENOTSUP);
}
@ -695,13 +670,6 @@ drmModeConnectorPtr drmModeGetConnectorCurrent(int fd, uint32_t connector_id)
int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
{
// TODO
Q_UNUSED(fd)
Q_UNUSED(crtc_id)
Q_UNUSED(size)
Q_UNUSED(red)
Q_UNUSED(green)
Q_UNUSED(blue)
return -(errno = ENOTSUP);
}
@ -1193,8 +1161,7 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *u
}
if (flags & DRM_MODE_PAGE_FLIP_EVENT) {
// TODO
Q_UNUSED(user_data)
// Unsupported
}
}
@ -1230,34 +1197,21 @@ int drmModeDestroyPropertyBlob(int fd, uint32_t id)
int drmModeCreateLease(int fd, const uint32_t *objects, int num_objects, int flags, uint32_t *lessee_id)
{
// TODO?
Q_UNUSED(fd)
Q_UNUSED(objects)
Q_UNUSED(num_objects)
Q_UNUSED(flags)
Q_UNUSED(lessee_id)
return -(errno = ENOTSUP);
}
drmModeLesseeListPtr drmModeListLessees(int fd)
{
// TODO
Q_UNUSED(fd)
return nullptr;
}
drmModeObjectListPtr drmModeGetLease(int fd)
{
// TODO?
Q_UNUSED(fd)
return nullptr;
}
int drmModeRevokeLease(int fd, uint32_t lessee_id)
{
// TODO?
Q_UNUSED(fd)
Q_UNUSED(lessee_id)
return -(errno = ENOTSUP);
}

View file

@ -398,7 +398,6 @@ Q_SIGNALS:
protected:
void paintEvent(QPaintEvent *event) override
{
Q_UNUSED(event)
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::red);
}

View file

@ -691,7 +691,6 @@ public:
bool eventFilter(QObject *watched, QEvent *event) override
{
Q_UNUSED(watched)
if (event->type() == QEvent::HoverMove) {
Q_EMIT hoverMove();
} else if (event->type() == QEvent::HoverLeave) {

View file

@ -27,8 +27,6 @@ public:
void paint(QPainter *painter, const QRect &repaintRegion) override
{
Q_UNUSED(painter)
Q_UNUSED(repaintRegion)
}
public Q_SLOTS:

View file

@ -33,7 +33,6 @@ Window::~Window() = default;
void Window::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::red);
}

View file

@ -32,7 +32,6 @@ Window::~Window() = default;
void Window::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::blue);
}

View file

@ -120,7 +120,6 @@ HelperWindow::~HelperWindow() = default;
void HelperWindow::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::red);
}
@ -158,19 +157,16 @@ void HelperWindow::mouseReleaseEvent(QMouseEvent *event)
void HelperWindow::wheelEvent(QWheelEvent *event)
{
Q_UNUSED(event)
Q_EMIT wheel();
}
void HelperWindow::keyPressEvent(QKeyEvent *event)
{
Q_UNUSED(event)
Q_EMIT keyPressed();
}
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
{
Q_UNUSED(event)
Q_EMIT keyReleased();
}

View file

@ -198,7 +198,6 @@ HelperWindow::~HelperWindow() = default;
void HelperWindow::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter p(this);
p.fillRect(0, 0, width(), height(), Qt::red);
}

View file

@ -244,7 +244,6 @@ void StackingOrderTest::testDeletedTransient()
// Close the top-most transient.
connect(transient2, &Window::windowClosed, this, [](Window *original, Deleted *deleted) {
Q_UNUSED(original)
deleted->refWindow();
});
@ -659,7 +658,6 @@ void StackingOrderTest::testDeletedGroupTransient()
// Unmap the transient.
connect(transient, &X11Window::windowClosed, this, [](Window *original, Deleted *deleted) {
Q_UNUSED(original)
deleted->refWindow();
});

View file

@ -275,7 +275,6 @@ MockInputMethod::~MockInputMethod()
void MockInputMethod::zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *context)
{
Q_UNUSED(context)
if (!m_inputSurface) {
m_inputSurface = Test::createSurface();
m_inputMethodSurface = Test::createInputPanelSurfaceV1(m_inputSurface.get(), s_waylandConnection.outputs.first());
@ -1306,7 +1305,6 @@ bool VirtualInputDevice::isEnabled() const
void VirtualInputDevice::setEnabled(bool enabled)
{
Q_UNUSED(enabled)
}
LEDs VirtualInputDevice::leds() const
@ -1316,7 +1314,6 @@ LEDs VirtualInputDevice::leds() const
void VirtualInputDevice::setLeds(LEDs leds)
{
Q_UNUSED(leds)
}
bool VirtualInputDevice::isKeyboard() const

View file

@ -363,7 +363,6 @@ void TouchInputTest::testGestureDetection()
{
bool callbackTriggered = false;
const auto callback = [&callbackTriggered](float progress) {
Q_UNUSED(progress);
callbackTriggered = true;
qWarning() << "progress callback!" << progress;
};

View file

@ -656,21 +656,15 @@ struct libinput *libinput_udev_create_context(const struct libinput_interface *i
if (!udev) {
return nullptr;
}
Q_UNUSED(interface)
Q_UNUSED(user_data)
return new libinput;
}
void libinput_log_set_priority(struct libinput *libinput, enum libinput_log_priority priority)
{
Q_UNUSED(libinput)
Q_UNUSED(priority)
}
void libinput_log_set_handler(struct libinput *libinput, libinput_log_handler log_handler)
{
Q_UNUSED(libinput)
Q_UNUSED(log_handler)
}
struct libinput *libinput_unref(struct libinput *libinput)
@ -693,30 +687,25 @@ int libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id)
int libinput_get_fd(struct libinput *libinput)
{
Q_UNUSED(libinput)
return -1;
}
int libinput_dispatch(struct libinput *libinput)
{
Q_UNUSED(libinput)
return 0;
}
struct libinput_event *libinput_get_event(struct libinput *libinput)
{
Q_UNUSED(libinput)
return nullptr;
}
void libinput_suspend(struct libinput *libinput)
{
Q_UNUSED(libinput)
}
int libinput_resume(struct libinput *libinput)
{
Q_UNUSED(libinput)
return 0;
}
@ -936,22 +925,18 @@ int libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device)
struct libinput_device_group *
libinput_device_get_device_group(struct libinput_device *device)
{
Q_UNUSED(device);
return nullptr;
}
void *
libinput_device_group_get_user_data(struct libinput_device_group *group)
{
Q_UNUSED(group);
return nullptr;
}
void libinput_device_led_update(struct libinput_device *device,
enum libinput_led leds)
{
Q_UNUSED(device)
Q_UNUSED(leds)
}
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
@ -969,9 +954,6 @@ double
libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event,
uint32_t width)
{
Q_UNUSED(event)
Q_UNUSED(width)
// it's unused at the moment, it doesn't really matter what we return
return 0;
}
@ -980,7 +962,5 @@ double
libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event,
uint32_t height)
{
Q_UNUSED(event)
Q_UNUSED(height)
return 4;
}

View file

@ -45,8 +45,6 @@ static const GLubyte *mock_glGetStringi(GLenum name, GLuint index)
static void mock_glGetIntegerv(GLenum pname, GLint *data)
{
Q_UNUSED(pname)
Q_UNUSED(data)
if (pname == GL_NUM_EXTENSIONS) {
if (data && s_gl) {
*data = s_gl->getString.extensions.count();

View file

@ -24,12 +24,10 @@ namespace KWin
void InputRedirection::installInputEventSpy(InputEventSpy *spy)
{
Q_UNUSED(spy);
}
void InputRedirection::uninstallInputEventSpy(InputEventSpy *spy)
{
Q_UNUSED(spy);
}
InputRedirection *InputRedirection::s_self = nullptr;

View file

@ -23,7 +23,6 @@ MockTabBoxHandler::~MockTabBoxHandler()
void MockTabBoxHandler::grabbedKeyEvent(QKeyEvent *event) const
{
Q_UNUSED(event)
}
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::activeClient() const
@ -38,7 +37,6 @@ void MockTabBoxHandler::setActiveClient(const QWeakPointer<TabBox::TabBoxClient>
QWeakPointer<TabBox::TabBoxClient> MockTabBoxHandler::clientToAddToList(TabBox::TabBoxClient *client, int desktop) const
{
Q_UNUSED(desktop)
QList<QSharedPointer<TabBox::TabBoxClient>>::const_iterator it = m_windows.constBegin();
for (; it != m_windows.constEnd(); ++it) {
if ((*it).get() == client) {

View file

@ -38,24 +38,17 @@ public:
}
QString desktopName(int desktop) const override
{
Q_UNUSED(desktop)
return "desktop 1";
}
QString desktopName(TabBox::TabBoxClient *client) const override
{
Q_UNUSED(client)
return "desktop";
}
void elevateClient(TabBox::TabBoxClient *c, QWindow *tabbox, bool elevate) const override
{
Q_UNUSED(c)
Q_UNUSED(tabbox)
Q_UNUSED(elevate)
}
void shadeClient(TabBox::TabBoxClient *c, bool b) const override
{
Q_UNUSED(c)
Q_UNUSED(b)
}
virtual void hideOutline()
{
@ -65,7 +58,6 @@ public:
bool isInFocusChain(TabBox::TabBoxClient *client) const override;
int nextDesktopFocusChain(int desktop) const override
{
Q_UNUSED(desktop)
return 1;
}
int numberOfDesktops() const override
@ -78,16 +70,12 @@ public:
}
void raiseClient(TabBox::TabBoxClient *c) const override
{
Q_UNUSED(c)
}
void restack(TabBox::TabBoxClient *c, TabBox::TabBoxClient *under) override
{
Q_UNUSED(c)
Q_UNUSED(under)
}
virtual void showOutline(const QRect &outline)
{
Q_UNUSED(outline)
}
TabBox::TabBoxClientList stackingOrder() const override
{
@ -97,8 +85,6 @@ public:
void highlightWindows(TabBox::TabBoxClient *window = nullptr, QWindow *controller = nullptr) override
{
Q_UNUSED(window)
Q_UNUSED(controller)
}
bool noModifierGrab() const override

View file

@ -21,20 +21,14 @@ InputRedirection *InputRedirection::s_self = nullptr;
void InputRedirection::registerAxisShortcut(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis, QAction *action)
{
Q_UNUSED(modifiers)
Q_UNUSED(axis)
Q_UNUSED(action)
}
void InputRedirection::registerTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *)
{
Q_UNUSED(fingerCount)
}
void InputRedirection::registerRealtimeTouchpadSwipeShortcut(SwipeDirection, uint fingerCount, QAction *, std::function<void(qreal)> progressCallback)
{
Q_UNUSED(progressCallback)
Q_UNUSED(fingerCount)
}
void InputRedirection::registerTouchscreenSwipeShortcut(SwipeDirection, uint, QAction *, std::function<void(qreal)>)

View file

@ -34,7 +34,6 @@ void EglGbmCursorLayer::aboutToStartPainting(const QRegion &damagedRegion)
bool EglGbmCursorLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
return m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
}

View file

@ -51,7 +51,6 @@ void EglGbmLayer::aboutToStartPainting(const QRegion &damagedRegion)
bool EglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
const bool ret = m_surface.endRendering(m_pipeline->renderOrientation(), damagedRegion);
if (ret) {
m_currentDamage = damagedRegion;

View file

@ -518,9 +518,6 @@ static std::chrono::nanoseconds convertTimestamp(clockid_t sourceClock, clockid_
void DrmGpu::pageFlipHandler(int fd, unsigned int sequence, unsigned int sec, unsigned int usec, unsigned int crtc_id, void *user_data)
{
Q_UNUSED(fd)
Q_UNUSED(sequence)
DrmGpu *gpu = static_cast<DrmGpu *>(user_data);
// The static_cast<> here are for a 32-bit environment where

View file

@ -46,7 +46,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmQPainterLayer::beginFrame()
bool DrmQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
m_currentDamage = damagedRegion;
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
@ -114,7 +113,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmCursorQPainterLayer::beginFrame()
bool DrmCursorQPainterLayer::endFrame(const QRegion &damagedRegion, const QRegion &renderedRegion)
{
Q_UNUSED(renderedRegion)
m_swapchain->releaseBuffer(m_swapchain->currentBuffer(), damagedRegion);
m_currentFramebuffer = DrmFramebuffer::createFramebuffer(m_swapchain->currentBuffer());
if (!m_currentFramebuffer) {
@ -161,7 +159,6 @@ std::optional<OutputLayerBeginFrameInfo> DrmVirtualQPainterLayer::beginFrame()
bool DrmVirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
m_currentDamage = damagedRegion;
return true;
}

View file

@ -78,7 +78,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualEglGbmLayer::beginFrame()
bool VirtualEglGbmLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion);
GLFramebuffer::popFramebuffer();
const auto buffer = m_gbmSurface->swapBuffers(damagedRegion);
if (buffer) {

View file

@ -16,8 +16,6 @@ FakeInputDevice::FakeInputDevice(KWaylandServer::FakeInputDevice *device, QObjec
, m_name(QStringLiteral("Fake Input Device %1").arg(++s_lastDeviceId))
{
connect(device, &KWaylandServer::FakeInputDevice::authenticationRequested, this, [device](const QString &application, const QString &reason) {
Q_UNUSED(application)
Q_UNUSED(reason)
// TODO: make secure
device->setAuthentication(true);
});
@ -99,7 +97,6 @@ bool FakeInputDevice::isEnabled() const
void FakeInputDevice::setEnabled(bool enabled)
{
Q_UNUSED(enabled)
}
LEDs FakeInputDevice::leds() const
@ -109,7 +106,6 @@ LEDs FakeInputDevice::leds() const
void FakeInputDevice::setLeds(LEDs leds)
{
Q_UNUSED(leds)
}
bool FakeInputDevice::isKeyboard() const

View file

@ -631,8 +631,6 @@ void Connection::applyScreenToDevice(Device *device)
// TODO: this is currently non-functional even on DRM. Needs orientation() override there.
device->setOrientation(Qt::PrimaryOrientation);
#else
Q_UNUSED(device)
#endif
}

View file

@ -25,7 +25,6 @@ namespace LibInput
static void libinputLogHandler(libinput *libinput, libinput_log_priority priority, const char *format, va_list args)
{
Q_UNUSED(libinput)
char buf[1024];
if (std::vsnprintf(buf, 1023, format, args) <= 0) {
return;

View file

@ -647,8 +647,6 @@ void Device::setOutputName(const QString &name)
m_outputName = name;
writeEntry(ConfigKey::OutputName, name);
Q_EMIT outputNameChanged();
#else
Q_UNUSED(name)
#endif
}

View file

@ -57,8 +57,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualEglLayer::beginFrame()
bool VirtualEglLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
Q_UNUSED(damagedRegion)
GLFramebuffer::popFramebuffer();
return true;
}

View file

@ -33,8 +33,6 @@ std::optional<OutputLayerBeginFrameInfo> VirtualQPainterLayer::beginFrame()
bool VirtualQPainterLayer::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
Q_UNUSED(damagedRegion)
return true;
}

View file

@ -226,7 +226,6 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
, m_pointer(pointer)
{
connect(pointer, &Pointer::entered, this, [this](quint32 serial, const QPointF &relativeToSurface) {
Q_UNUSED(relativeToSurface)
m_enteredSerial = serial;
});
connect(pointer, &Pointer::motion, this, [this](const QPointF &relativeToSurface, quint32 time) {
@ -236,7 +235,6 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
Q_EMIT pointerMotionAbsolute(absolutePos, time, this);
});
connect(pointer, &Pointer::buttonStateChanged, this, [this](quint32 serial, quint32 time, quint32 button, Pointer::ButtonState nativeState) {
Q_UNUSED(serial)
InputRedirection::PointerButtonState state;
switch (nativeState) {
case Pointer::ButtonState::Pressed:
@ -270,35 +268,29 @@ WaylandInputDevice::WaylandInputDevice(KWayland::Client::Pointer *pointer, Wayla
if (pointerGestures) {
m_pinchGesture.reset(pointerGestures->createPinchGesture(m_pointer.get(), this));
connect(m_pinchGesture.get(), &PointerPinchGesture::started, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial);
Q_EMIT pinchGestureBegin(m_pinchGesture->fingerCount(), time, this);
});
connect(m_pinchGesture.get(), &PointerPinchGesture::updated, this, [this](const QSizeF &delta, qreal scale, qreal rotation, quint32 time) {
Q_EMIT pinchGestureUpdate(scale, rotation, QSIZE_TO_QPOINT(delta), time, this);
});
connect(m_pinchGesture.get(), &PointerPinchGesture::ended, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial)
Q_EMIT pinchGestureEnd(time, this);
});
connect(m_pinchGesture.get(), &PointerPinchGesture::cancelled, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial)
Q_EMIT pinchGestureCancelled(time, this);
});
m_swipeGesture.reset(pointerGestures->createSwipeGesture(m_pointer.get(), this));
connect(m_swipeGesture.get(), &PointerSwipeGesture::started, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial)
Q_EMIT swipeGestureBegin(m_swipeGesture->fingerCount(), time, this);
});
connect(m_swipeGesture.get(), &PointerSwipeGesture::updated, this, [this](const QSizeF &delta, quint32 time) {
Q_EMIT swipeGestureUpdate(QSIZE_TO_QPOINT(delta), time, this);
});
connect(m_swipeGesture.get(), &PointerSwipeGesture::ended, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial)
Q_EMIT swipeGestureEnd(time, this);
});
connect(m_swipeGesture.get(), &PointerSwipeGesture::cancelled, this, [this](quint32 serial, quint32 time) {
Q_UNUSED(serial)
Q_EMIT swipeGestureCancelled(time, this);
});
}
@ -358,7 +350,6 @@ bool WaylandInputDevice::isEnabled() const
void WaylandInputDevice::setEnabled(bool enabled)
{
Q_UNUSED(enabled)
}
LEDs WaylandInputDevice::leds() const
@ -368,7 +359,6 @@ LEDs WaylandInputDevice::leds() const
void WaylandInputDevice::setLeds(LEDs leds)
{
Q_UNUSED(leds)
}
bool WaylandInputDevice::isKeyboard() const
@ -676,7 +666,6 @@ bool WaylandBackend::initialize()
m_waylandCursor->installImage();
});
connect(Cursors::self(), &Cursors::positionChanged, this, [this](Cursor *cursor, const QPoint &position) {
Q_UNUSED(cursor)
if (m_waylandCursor) {
m_waylandCursor->move(position);
}

View file

@ -80,7 +80,6 @@ public:
virtual void init();
virtual void move(const QPointF &globalPosition)
{
Q_UNUSED(globalPosition)
}
void installImage();

View file

@ -161,7 +161,6 @@ std::optional<OutputLayerBeginFrameInfo> WaylandEglOutput::beginFrame()
bool WaylandEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
m_damageJournal.add(damagedRegion);
GLFramebuffer::popFramebuffer();
return true;

View file

@ -151,7 +151,6 @@ XdgShellOutput::~XdgShellOutput()
void XdgShellOutput::handleConfigure(const QSize &size, XdgShellSurface::States states, quint32 serial)
{
Q_UNUSED(states);
m_xdgShellSurface->ackConfigure(serial);
if (size.width() > 0 && size.height() > 0) {
resize(size * scale());

View file

@ -48,8 +48,6 @@ public:
virtual void lockPointer(KWayland::Client::Pointer *pointer, bool lock)
{
Q_UNUSED(pointer)
Q_UNUSED(lock)
}
virtual bool pointerIsLocked()

View file

@ -69,7 +69,6 @@ void WaylandQPainterOutput::remapBuffer()
void WaylandQPainterOutput::updateSize(const QSize &size)
{
Q_UNUSED(size)
m_back = nullptr;
m_slots.clear();
}
@ -136,8 +135,6 @@ std::optional<OutputLayerBeginFrameInfo> WaylandQPainterOutput::beginFrame()
bool WaylandQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
m_damageJournal.add(damagedRegion);
return true;
}

View file

@ -152,7 +152,6 @@ void EglBackend::endFrame(const QRegion &renderedRegion, const QRegion &damagedR
void EglBackend::present(Output *output)
{
Q_UNUSED(output)
// Start the software vsync monitor. There is no any reliable way to determine when
// eglSwapBuffers() or eglSwapBuffersWithDamageEXT() completes.
m_vsyncMonitor->arm();
@ -198,7 +197,6 @@ void EglBackend::presentSurface(EGLSurface surface, const QRegion &damage, const
OutputLayer *EglBackend::primaryLayer(Output *output)
{
Q_UNUSED(output)
return m_layer.get();
}
@ -226,7 +224,6 @@ bool EglSurfaceTextureX11::create()
void EglSurfaceTextureX11::update(const QRegion &region)
{
Q_UNUSED(region)
// mipmaps need to be updated
m_texture->setDirty();
}

View file

@ -806,8 +806,6 @@ void GlxBackend::endFrame(const QRegion &renderedRegion, const QRegion &damagedR
void GlxBackend::present(Output *output)
{
Q_UNUSED(output)
// If the GLX_INTEL_swap_event extension is not used for getting presentation feedback,
// assume that the frame will be presented at the next vblank event, this is racy.
if (m_vsyncMonitor) {
@ -861,7 +859,6 @@ OverlayWindow *GlxBackend::overlayWindow() const
OutputLayer *GlxBackend::primaryLayer(Output *output)
{
Q_UNUSED(output)
return m_layer.get();
}
@ -883,7 +880,6 @@ bool GlxSurfaceTextureX11::create()
void GlxSurfaceTextureX11::update(const QRegion &region)
{
Q_UNUSED(region)
// mipmaps need to be updated
m_texture->setDirty();
}

View file

@ -21,7 +21,6 @@ XFixesCursorEventFilter::XFixesCursorEventFilter(X11Cursor *cursor)
bool XFixesCursorEventFilter::event(xcb_generic_event_t *event)
{
Q_UNUSED(event);
m_cursor->notifyCursorChanged();
return false;
}

View file

@ -79,7 +79,6 @@ bool X11WindowedInputDevice::isEnabled() const
void X11WindowedInputDevice::setEnabled(bool enabled)
{
Q_UNUSED(enabled)
}
LEDs X11WindowedInputDevice::leds() const
@ -89,7 +88,6 @@ LEDs X11WindowedInputDevice::leds() const
void X11WindowedInputDevice::setLeds(LEDs leds)
{
Q_UNUSED(leds)
}
bool X11WindowedInputDevice::isKeyboard() const

View file

@ -55,7 +55,6 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedEglOutput::beginFrame()
bool X11WindowedEglOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
m_lastDamage = damagedRegion;
GLFramebuffer::popFramebuffer();
return true;

View file

@ -45,8 +45,6 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedQPainterOutput::beginFrame()
bool X11WindowedQPainterOutput::endFrame(const QRegion &renderedRegion, const QRegion &damagedRegion)
{
Q_UNUSED(renderedRegion)
Q_UNUSED(damagedRegion)
return true;
}

View file

@ -309,7 +309,6 @@ QSize Output::orientateSize(const QSize &size) const
void Output::setDpmsMode(DpmsMode mode)
{
Q_UNUSED(mode)
}
Output::DpmsMode Output::dpmsMode() const
@ -395,7 +394,6 @@ Output::RgbRange Output::rgbRange() const
void Output::setColorTransformation(const std::shared_ptr<ColorTransformation> &transformation)
{
Q_UNUSED(transformation);
}
ContentType Output::contentType() const

View file

@ -31,12 +31,10 @@ void OutputLayer::resetRepaints()
void OutputLayer::aboutToStartPainting(const QRegion &damage)
{
Q_UNUSED(damage)
}
bool OutputLayer::scanout(SurfaceItem *surfaceItem)
{
Q_UNUSED(surfaceItem)
return false;
}

View file

@ -60,17 +60,11 @@ std::unique_ptr<QPainterBackend> Platform::createQPainterBackend()
std::optional<DmaBufParams> Platform::testCreateDmaBuf(const QSize &size, quint32 format, const QVector<uint64_t> &modifiers)
{
Q_UNUSED(size)
Q_UNUSED(format)
Q_UNUSED(modifiers)
return {};
}
std::shared_ptr<DmaBufTexture> Platform::createDmaBufTexture(const QSize &size, quint32 format, uint64_t modifier)
{
Q_UNUSED(size)
Q_UNUSED(format)
Q_UNUSED(modifier)
return {};
}
@ -132,9 +126,6 @@ void Platform::setReady(bool ready)
Output *Platform::createVirtualOutput(const QString &name, const QSize &size, double scale)
{
Q_UNUSED(name);
Q_UNUSED(size);
Q_UNUSED(scale);
return nullptr;
}
@ -145,7 +136,6 @@ void Platform::removeVirtualOutput(Output *output)
void Platform::warpPointer(const QPointF &globalPos)
{
Q_UNUSED(globalPos)
}
bool Platform::supportsNativeFence() const
@ -188,7 +178,6 @@ bool Platform::openGLCompositingIsBroken() const
void Platform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
{
Q_UNUSED(safePoint)
}
void Platform::startInteractiveWindowSelection(std::function<void(KWin::Window *)> callback, const QByteArray &cursorName)

View file

@ -327,7 +327,6 @@ void ConsoleKitSession::handleResumeDevice(uint major, uint minor, QDBusUnixFile
{
// We don't care about the file descriptor as the libinput backend will re-open input devices
// and the drm file descriptors remain valid after pausing gpus.
Q_UNUSED(fileDescriptor)
Q_EMIT deviceResumed(makedev(major, minor));
}

View file

@ -326,7 +326,6 @@ void LogindSession::handleResumeDevice(uint major, uint minor, QDBusUnixFileDesc
{
// We don't care about the file descriptor as the libinput backend will re-open input devices
// and the drm file descriptors remain valid after pausing gpus.
Q_UNUSED(fileDescriptor)
Q_EMIT deviceResumed(makedev(major, minor));
}

View file

@ -40,18 +40,15 @@ uint NoopSession::terminal() const
int NoopSession::openRestricted(const QString &fileName)
{
Q_UNUSED(fileName)
return -1;
}
void NoopSession::closeRestricted(int fileDescriptor)
{
Q_UNUSED(fileDescriptor)
}
void NoopSession::switchTo(uint terminal)
{
Q_UNUSED(terminal)
}
} // namespace KWin

View file

@ -160,7 +160,6 @@ void Cursor::updateTheme(const QString &name, int size)
void Cursor::slotKGlobalSettingsNotifyChange(int type, int arg)
{
// #endif
Q_UNUSED(arg)
if (type == 5 /*CursorChanged*/) {
InputConfig::self()->inputConfig()->reparseConfiguration();
loadThemeFromKConfig();

View file

@ -114,7 +114,6 @@ bool DBusInterface::startActivity(const QString &in0)
}
return Workspace::self()->activities()->start(in0);
#else
Q_UNUSED(in0)
return false;
#endif
}
@ -127,7 +126,6 @@ bool DBusInterface::stopActivity(const QString &in0)
}
return Workspace::self()->activities()->stop(in0);
#else
Q_UNUSED(in0)
return false;
#endif
}
@ -381,13 +379,10 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
this);
connect(m_manager, &VirtualDesktopManager::currentChanged, this, [this](uint previousDesktop, uint newDesktop) {
Q_UNUSED(previousDesktop);
Q_UNUSED(newDesktop);
Q_EMIT currentChanged(m_manager->currentDesktop()->id());
});
connect(m_manager, &VirtualDesktopManager::countChanged, this, [this](uint previousCount, uint newCount) {
Q_UNUSED(previousCount);
Q_EMIT countChanged(newCount);
Q_EMIT desktopsChanged(desktops());
});

View file

@ -977,7 +977,6 @@ DebugConsoleModel::~DebugConsoleModel() = default;
int DebugConsoleModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 2;
}
@ -1130,7 +1129,6 @@ QModelIndex DebugConsoleModel::parent(const QModelIndex &child) const
QVariant DebugConsoleModel::propertyData(QObject *object, const QModelIndex &index, int role) const
{
Q_UNUSED(role)
const auto property = object->metaObject()->property(index.row());
if (index.column() == 0) {
return property.name();
@ -1341,7 +1339,6 @@ SurfaceTreeModel::~SurfaceTreeModel() = default;
int SurfaceTreeModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 1;
}
@ -1502,7 +1499,6 @@ InputDeviceModel::~InputDeviceModel() = default;
int InputDeviceModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 2;
}
@ -1609,7 +1605,6 @@ QModelIndex DataSourceModel::index(int row, int column, const QModelIndex &paren
QModelIndex DataSourceModel::parent(const QModelIndex &child) const
{
Q_UNUSED(child)
return QModelIndex();
}

View file

@ -199,7 +199,6 @@ void DecorationItem::handleFrameGeometryChanged()
void DecorationItem::handleWindowClosed(Window *original, Deleted *deleted)
{
Q_UNUSED(original)
m_window = deleted;
// If the decoration is about to be destroyed, render the decoration for the last time.

View file

@ -170,8 +170,6 @@ bool Deleted::isDeleted() const
NET::WindowType Deleted::windowType(bool direct, int supportedTypes) const
{
Q_UNUSED(direct)
Q_UNUSED(supportedTypes)
return m_type;
}

View file

@ -30,15 +30,12 @@ DpmsInputEventFilter::~DpmsInputEventFilter() = default;
bool DpmsInputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
{
Q_UNUSED(event)
Q_UNUSED(nativeButton)
notify();
return true;
}
bool DpmsInputEventFilter::wheelEvent(QWheelEvent *event)
{
Q_UNUSED(event)
notify();
return true;
}
@ -53,8 +50,6 @@ bool DpmsInputEventFilter::keyEvent(QKeyEvent *event)
bool DpmsInputEventFilter::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(pos)
Q_UNUSED(time)
if (m_enableDoubleTap) {
if (m_touchPoints.isEmpty()) {
if (!m_doubleTapTimer.isValid()) {
@ -96,9 +91,6 @@ bool DpmsInputEventFilter::touchUp(qint32 id, quint32 time)
bool DpmsInputEventFilter::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
// ignore the event
return true;
}

View file

@ -341,11 +341,9 @@ void EffectsHandlerImpl::setupWindowConnections(Window *window)
Q_EMIT windowHidden(window->effectWindow());
});
connect(window, &Window::keepAboveChanged, this, [this, window](bool above) {
Q_UNUSED(above)
Q_EMIT windowKeepAboveChanged(window->effectWindow());
});
connect(window, &Window::keepBelowChanged, this, [this, window](bool below) {
Q_UNUSED(below)
Q_EMIT windowKeepBelowChanged(window->effectWindow());
});
connect(window, &Window::fullScreenChanged, this, [this, window]() {
@ -755,7 +753,6 @@ bool EffectsHandlerImpl::tabletToolEvent(TabletEvent *event)
bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletToolButtonEvent(button, pressed, tabletToolId.m_uniqueId)) {
@ -767,7 +764,6 @@ bool EffectsHandlerImpl::tabletToolButtonEvent(uint button, bool pressed, const
bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadButtonEvent(button, pressed, tabletPadId.data)) {
@ -779,7 +775,6 @@ bool EffectsHandlerImpl::tabletPadButtonEvent(uint button, bool pressed, const T
bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadStripEvent(number, position, isFinger, tabletPadId.data)) {
@ -791,7 +786,6 @@ bool EffectsHandlerImpl::tabletPadStripEvent(int number, int position, bool isFi
bool EffectsHandlerImpl::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(time)
// TODO: reverse call order?
for (auto it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if (it->second->tabletPadRingEvent(number, position, isFinger, tabletPadId.data)) {
@ -1180,8 +1174,6 @@ void EffectsHandlerImpl::setTabBoxWindow(EffectWindow *w)
if (window->isClient()) {
workspace()->tabbox()->setCurrentClient(window);
}
#else
Q_UNUSED(w)
#endif
}
@ -1189,8 +1181,6 @@ void EffectsHandlerImpl::setTabBoxDesktop(int desktop)
{
#if KWIN_BUILD_TABBOX
workspace()->tabbox()->setCurrentDesktop(desktop);
#else
Q_UNUSED(desktop)
#endif
}
@ -2588,7 +2578,6 @@ const QRect &EffectFrameImpl::geometry() const
void EffectFrameImpl::setGeometry(const QRect &geometry, bool force)
{
Q_UNUSED(force)
m_view->setGeometry(geometry);
}
@ -2623,8 +2612,6 @@ void EffectFrameImpl::setPosition(const QPoint &point)
void EffectFrameImpl::render(const QRegion &region, double opacity, double frameOpacity)
{
Q_UNUSED(region);
if (!m_view->rootItem()) {
return;
}

View file

@ -79,9 +79,6 @@ void BlendChanges::postPaintScreen()
void BlendChanges::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
{
Q_UNUSED(w)
Q_UNUSED(mask)
Q_UNUSED(region)
data.setCrossFadeProgress(m_timeline.value());
effects->paintWindow(w, mask, region, data);
}

View file

@ -264,8 +264,6 @@ void BlurEffect::initBlurStrengthValues()
void BlurEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
BlurConfig::self()->read();
int blurStrength = BlurConfig::blurStrength() - 1;
@ -794,8 +792,6 @@ void BlurEffect::doBlur(const QRegion &shape, const QRect &screen, const float o
void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int blurRectCount, const QMatrix4x4 &screenProjection, QPoint windowPosition)
{
Q_UNUSED(windowPosition)
m_renderTextures[1]->bind();
m_shader->bind(BlurShader::UpSampleType);

View file

@ -120,8 +120,6 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags)
for (const int &border : touchActivateBorders) {
m_touchBorderActivate.append(ElectricBorder(border));
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
Q_UNUSED(screen)
if (m_status == Status::Active) {
return;
}

View file

@ -58,8 +58,6 @@ DimInactiveEffect::~DimInactiveEffect()
void DimInactiveEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
DimInactiveConfig::self()->read();
// TODO: Use normalized strength param.

View file

@ -64,8 +64,6 @@ void FallApartEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data,
void FallApartEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
{
Q_UNUSED(w)
Q_UNUSED(mask)
auto animationIt = windows.constFind(w);
if (animationIt != windows.constEnd() && isRealWindow(w)) {
const qreal t = animationIt->progress;

View file

@ -75,8 +75,6 @@ GlideEffect::~GlideEffect() = default;
void GlideEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
GlideConfig::self()->read();
m_duration = std::chrono::milliseconds(animationTime<GlideConfig>(160));

View file

@ -85,8 +85,6 @@ void KscreenEffect::addScreen(EffectScreen *screen)
void KscreenEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
KscreenConfig::self()->read();
m_xcbState.m_timeLine.setDuration(
std::chrono::milliseconds(animationTime<KscreenConfig>(250)));

View file

@ -71,8 +71,6 @@ void MagicLampEffect::prePaintWindow(EffectWindow *w, WindowPrePaintData &data,
void MagicLampEffect::apply(EffectWindow *w, int mask, WindowPaintData &data, WindowQuadList &quads)
{
Q_UNUSED(mask)
Q_UNUSED(data)
auto animationIt = m_animations.constFind(w);
if (animationIt != m_animations.constEnd()) {
// 0 = not minimized, 1 = fully minimized

View file

@ -116,7 +116,6 @@ void OverviewEffect::reconfigure(ReconfigureFlags)
for (const int &border : touchActivateBorders) {
m_touchBorderActivate.append(ElectricBorder(border));
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_realtimeToggleAction, [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
Q_UNUSED(screen)
if (m_status == Status::Active) {
return;
}

View file

@ -298,13 +298,11 @@ ScreenShotSink1::ScreenShotSink1(ScreenShotDBusInterface1 *interface, QDBusMessa
void ScreenShotSink1::flush(const QImage &image)
{
Q_UNUSED(image)
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
}
void ScreenShotSink1::flushMulti(const QList<QImage> &images)
{
Q_UNUSED(images)
qCWarning(KWIN_SCREENSHOT) << metaObject()->className() << "does not implement" << Q_FUNC_INFO;
}

View file

@ -62,8 +62,6 @@ SheetEffect::SheetEffect()
void SheetEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
SheetConfig::self()->read();
// TODO: Rename AnimationTime config key to Duration.

View file

@ -289,8 +289,6 @@ bool SlideEffect::shouldElevate(const EffectWindow *w) const
*/
void SlideEffect::startAnimation(int old, int current, EffectWindow *movingWindow)
{
Q_UNUSED(old)
if (m_state == State::Inactive) {
prepareSwitching();
}

View file

@ -91,7 +91,6 @@ bool SlidingPopupsEffect::supported()
void SlidingPopupsEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
SlidingPopupsConfig::self()->read();
m_slideInDuration = std::chrono::milliseconds(
static_cast<int>(animationTime(SlidingPopupsConfig::slideInTime() != 0 ? SlidingPopupsConfig::slideInTime() : 150)));

View file

@ -75,8 +75,6 @@ SnapHelperEffect::~SnapHelperEffect()
void SnapHelperEffect::reconfigure(ReconfigureFlags flags)
{
Q_UNUSED(flags)
m_animation.timeLine.setDuration(
std::chrono::milliseconds(static_cast<int>(animationTime(250))));
}

View file

@ -88,7 +88,6 @@ StartupFeedbackEffect::StartupFeedbackEffect()
Q_EMIT effects->startupAdded(id.id(), icon);
});
connect(m_startupInfo, &KStartupInfo::gotRemoveStartup, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
Q_UNUSED(data);
Q_EMIT effects->startupRemoved(id.id());
});
connect(m_startupInfo, &KStartupInfo::gotStartupChange, this, [](const KStartupInfoId &id, const KStartupInfoData &data) {
@ -132,7 +131,6 @@ bool StartupFeedbackEffect::supported()
void StartupFeedbackEffect::reconfigure(Effect::ReconfigureFlags flags)
{
Q_UNUSED(flags)
KConfigGroup c = m_configWatcher->config()->group("FeedbackStyle");
const bool busyCursor = c.readEntry("BusyCursor", true);
@ -247,12 +245,6 @@ void StartupFeedbackEffect::postPaintScreen()
void StartupFeedbackEffect::slotMouseChanged(const QPoint &pos, const QPoint &oldpos, Qt::MouseButtons buttons,
Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers)
{
Q_UNUSED(pos)
Q_UNUSED(oldpos)
Q_UNUSED(buttons)
Q_UNUSED(oldbuttons)
Q_UNUSED(modifiers)
Q_UNUSED(oldmodifiers)
if (m_active) {
m_dirtyRect |= m_currentGeometry;
m_currentGeometry = feedbackRect();

View file

@ -56,7 +56,6 @@ Qt::GlobalColor TouchPointsEffect::colorForId(quint32 id)
bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
TouchPoint point;
point.pos = pos;
point.press = true;
@ -69,7 +68,6 @@ bool TouchPointsEffect::touchDown(qint32 id, const QPointF &pos, quint32 time)
bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(time)
TouchPoint point;
point.pos = pos;
point.press = true;
@ -82,7 +80,6 @@ bool TouchPointsEffect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
bool TouchPointsEffect::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(time)
auto it = m_latestPositions.constFind(id);
if (it != m_latestPositions.constEnd()) {
TouchPoint point;

View file

@ -221,7 +221,6 @@ void WindowViewEffect::reconfigure(ReconfigureFlags)
}
auto touchCallback = [this](ElectricBorder border, const QPointF &deltaProgress, const EffectScreen *screen) {
Q_UNUSED(screen)
if (m_status == Status::Active) {
return;
}

View file

@ -322,7 +322,6 @@ void WobblyWindowsEffect::slotWindowStartUserMovedResized(EffectWindow *w)
void WobblyWindowsEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRectF &geometry)
{
Q_UNUSED(geometry)
if (windows.contains(w)) {
WindowWobblyInfos &wwi = windows[w];
const QRectF rect = w->frameGeometry();
@ -364,8 +363,6 @@ void WobblyWindowsEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
void WobblyWindowsEffect::slotWindowMaximizeStateChanged(EffectWindow *w, bool horizontal, bool vertical)
{
Q_UNUSED(horizontal)
Q_UNUSED(vertical)
if (w->isUserMove() || w->isSpecialWindow()) {
return;
}

View file

@ -329,8 +329,6 @@ int GestureRecognizer::startPinchGesture(uint fingerCount)
void GestureRecognizer::updatePinchGesture(qreal scale, qreal angleDelta, const QPointF &posDelta)
{
Q_UNUSED(angleDelta);
Q_UNUSED(posDelta);
m_currentScale = scale;
// Determine the direction of the swipe

View file

@ -119,7 +119,6 @@ void KWinWrapper::run()
m_kwinProcess->setArguments(args);
connect(m_kwinProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, [this](int exitCode, QProcess::ExitStatus exitStatus) {
Q_UNUSED(exitStatus)
if (exitCode == 0) {
qApp->quit();
return;

View file

@ -16,21 +16,16 @@ namespace KWin
void HideCursorSpy::pointerEvent(MouseEvent *event)
{
Q_UNUSED(event)
showCursor();
}
void HideCursorSpy::wheelEvent(KWin::WheelEvent *event)
{
Q_UNUSED(event)
showCursor();
}
void HideCursorSpy::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
hideCursor();
}

View file

@ -105,43 +105,31 @@ InputEventFilter::~InputEventFilter()
bool InputEventFilter::pointerEvent(QMouseEvent *event, quint32 nativeButton)
{
Q_UNUSED(event)
Q_UNUSED(nativeButton)
return false;
}
bool InputEventFilter::wheelEvent(QWheelEvent *event)
{
Q_UNUSED(event)
return false;
}
bool InputEventFilter::keyEvent(QKeyEvent *event)
{
Q_UNUSED(event)
return false;
}
bool InputEventFilter::touchDown(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::touchMotion(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)
return false;
}
@ -157,124 +145,86 @@ bool InputEventFilter::touchFrame()
bool InputEventFilter::pinchGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
{
Q_UNUSED(scale)
Q_UNUSED(angleDelta)
Q_UNUSED(delta)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::pinchGestureEnd(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::pinchGestureCancelled(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::swipeGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::swipeGestureUpdate(const QPointF &delta, quint32 time)
{
Q_UNUSED(delta)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::swipeGestureEnd(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::swipeGestureCancelled(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::holdGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::holdGestureEnd(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::holdGestureCancelled(quint32 time)
{
Q_UNUSED(time)
return false;
}
bool InputEventFilter::switchEvent(SwitchEvent *event)
{
Q_UNUSED(event)
return false;
}
bool InputEventFilter::tabletToolEvent(TabletEvent *event)
{
Q_UNUSED(event)
return false;
}
bool InputEventFilter::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
bool InputEventFilter::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
return false;
}
@ -477,69 +427,52 @@ public:
}
bool pinchGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
{
Q_UNUSED(scale)
Q_UNUSED(angleDelta)
Q_UNUSED(delta)
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool pinchGestureEnd(quint32 time) override
{
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool pinchGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool swipeGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
{
Q_UNUSED(delta)
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool swipeGestureEnd(quint32 time) override
{
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool swipeGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool holdGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
bool holdGestureEnd(quint32 time) override
{
Q_UNUSED(time)
// no touchpad multi-finger gestures on lock screen
return waylandServer()->isScreenLocked();
}
@ -574,7 +507,6 @@ class EffectsFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
if (!effects) {
return false;
}
@ -660,7 +592,6 @@ class MoveResizeFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
Window *window = workspace()->moveResizeWindow();
if (!window) {
return false;
@ -681,7 +612,6 @@ public:
}
bool wheelEvent(QWheelEvent *event) override
{
Q_UNUSED(event)
// filter out while moving a window
return workspace()->moveResizeWindow() != nullptr;
}
@ -703,9 +633,6 @@ public:
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
Window *window = workspace()->moveResizeWindow();
if (!window) {
return false;
@ -715,7 +642,6 @@ public:
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
Window *window = workspace()->moveResizeWindow();
if (!window) {
return false;
@ -732,7 +658,6 @@ public:
bool touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(time)
Window *window = workspace()->moveResizeWindow();
if (!window) {
return false;
@ -777,7 +702,6 @@ class WindowSelectorFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
if (!m_active) {
return false;
}
@ -798,13 +722,11 @@ public:
}
bool wheelEvent(QWheelEvent *event) override
{
Q_UNUSED(event)
// filter out while selecting a window
return m_active;
}
bool keyEvent(QKeyEvent *event) override
{
Q_UNUSED(event)
if (!m_active) {
return false;
}
@ -846,7 +768,6 @@ public:
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
if (!isActive()) {
return false;
}
@ -856,7 +777,6 @@ public:
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
if (!isActive()) {
return false;
}
@ -869,7 +789,6 @@ public:
bool touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(time)
if (!isActive()) {
return false;
}
@ -954,7 +873,6 @@ public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton);
if (event->type() == QEvent::MouseButtonPress) {
if (input()->shortcuts()->processPointerPressed(event->modifiers(), event->buttons())) {
return true;
@ -1009,7 +927,6 @@ public:
}
bool swipeGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(time)
m_touchpadGestureFingerCount = fingerCount;
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processSwipeStart(DeviceType::Touchpad, fingerCount);
@ -1020,7 +937,6 @@ public:
}
bool swipeGestureUpdate(const QPointF &delta, quint32 time) override
{
Q_UNUSED(time)
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processSwipeUpdate(DeviceType::Touchpad, delta);
return true;
@ -1030,7 +946,6 @@ public:
}
bool swipeGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processSwipeCancel(DeviceType::Touchpad);
return true;
@ -1040,7 +955,6 @@ public:
}
bool swipeGestureEnd(quint32 time) override
{
Q_UNUSED(time)
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processSwipeEnd(DeviceType::Touchpad);
return true;
@ -1050,7 +964,6 @@ public:
}
bool pinchGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(time);
m_touchpadGestureFingerCount = fingerCount;
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processPinchStart(fingerCount);
@ -1061,7 +974,6 @@ public:
}
bool pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
{
Q_UNUSED(time);
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processPinchUpdate(scale, angleDelta, delta);
return true;
@ -1071,7 +983,6 @@ public:
}
bool pinchGestureEnd(quint32 time) override
{
Q_UNUSED(time);
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processPinchEnd();
return true;
@ -1081,7 +992,6 @@ public:
}
bool pinchGestureCancelled(quint32 time) override
{
Q_UNUSED(time);
if (m_touchpadGestureFingerCount >= 3) {
input()->shortcuts()->processPinchCancel();
return true;
@ -1135,7 +1045,6 @@ public:
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time);
if (m_gestureTaken) {
if (m_gestureCancelled) {
return true;
@ -1156,7 +1065,6 @@ public:
bool touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(time);
m_touchPoints.remove(id);
if (m_gestureTaken) {
if (!m_gestureCancelled) {
@ -1267,7 +1175,6 @@ class InternalWindowEventFilter : public InputEventFilter
{
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
if (!input()->pointer()->focus() || !input()->pointer()->focus()->isInternal()) {
return false;
}
@ -1438,7 +1345,6 @@ class DecorationEventFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
auto decoration = input()->pointer()->decoration();
if (!decoration) {
return false;
@ -1540,7 +1446,6 @@ public:
}
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
auto decoration = input()->touch()->decoration();
if (!decoration) {
return false;
@ -1562,7 +1467,6 @@ public:
}
bool touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(time);
auto decoration = input()->touch()->decoration();
if (!decoration) {
// can happen when quick tiling
@ -1653,7 +1557,6 @@ class TabBoxInputFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 button) override
{
Q_UNUSED(button)
if (!workspace()->tabbox() || !workspace()->tabbox()->isGrabbed()) {
return false;
}
@ -1693,14 +1596,12 @@ class ScreenEdgeInputFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
workspace()->screenEdges()->isEntered(event);
// always forward
return false;
}
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
// TODO: better check whether a touch sequence is in progress
if (m_touchInProgress || waylandServer()->seat()->isTouchSequence()) {
// cancel existing touch
@ -1719,7 +1620,6 @@ public:
}
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(time)
if (m_touchInProgress && m_id == id) {
workspace()->screenEdges()->gestureRecognizer()->updateSwipeGesture(pos - m_lastPos);
m_lastPos = pos;
@ -1729,7 +1629,6 @@ public:
}
bool touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(time)
if (m_touchInProgress && m_id == id) {
workspace()->screenEdges()->gestureRecognizer()->endSwipeGesture();
m_touchInProgress = false;
@ -1753,7 +1652,6 @@ class WindowActionInputFilter : public InputEventFilter
public:
bool pointerEvent(QMouseEvent *event, quint32 nativeButton) override
{
Q_UNUSED(nativeButton)
if (event->type() != QEvent::MouseButtonPress) {
return false;
}
@ -1785,8 +1683,6 @@ public:
}
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(id)
Q_UNUSED(time)
auto seat = waylandServer()->seat();
if (seat->isTouchSequence()) {
return false;
@ -2344,7 +2240,6 @@ public:
bool tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
{
Q_UNUSED(time)
KWaylandServer::TabletSeatV2Interface *tabletSeat = findTabletSeat();
auto tool = tabletSeat->toolByHardwareSerial(tabletToolId.m_serialId, getType(tabletToolId));
if (!tool) {
@ -2737,7 +2632,6 @@ public:
void tabletPadButtonEvent(uint, bool pressed, const KWin::TabletPadId &, uint time) override
{
Q_UNUSED(time)
if (!pressed) {
return;
}
@ -2746,7 +2640,6 @@ public:
void tabletToolButtonEvent(uint, bool pressed, const KWin::TabletToolId &, uint time) override
{
Q_UNUSED(time)
if (!pressed) {
return;
}
@ -2781,144 +2674,96 @@ class UserActivitySpy : public InputEventSpy
public:
void pointerEvent(MouseEvent *event) override
{
Q_UNUSED(event)
notifyActivity();
}
void wheelEvent(WheelEvent *event) override
{
Q_UNUSED(event)
notifyActivity();
}
void keyEvent(KeyEvent *event) override
{
Q_UNUSED(event)
notifyActivity();
}
void touchDown(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
notifyActivity();
}
void touchMotion(qint32 id, const QPointF &pos, quint32 time) override
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
notifyActivity();
}
void touchUp(qint32 id, quint32 time) override
{
Q_UNUSED(id)
Q_UNUSED(time)
notifyActivity();
}
void pinchGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
notifyActivity();
}
void pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time) override
{
Q_UNUSED(scale)
Q_UNUSED(angleDelta)
Q_UNUSED(delta)
Q_UNUSED(time)
notifyActivity();
}
void pinchGestureEnd(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void pinchGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void swipeGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
notifyActivity();
}
void swipeGestureUpdate(const QPointF &delta, quint32 time) override
{
Q_UNUSED(delta)
Q_UNUSED(time)
notifyActivity();
}
void swipeGestureEnd(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void swipeGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void holdGestureBegin(int fingerCount, quint32 time) override
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
notifyActivity();
}
void holdGestureEnd(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void holdGestureCancelled(quint32 time) override
{
Q_UNUSED(time)
notifyActivity();
}
void tabletToolEvent(TabletEvent *event) override
{
Q_UNUSED(event)
notifyActivity();
}
void tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time) override
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletToolId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}
void tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time) override
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
notifyActivity();
}

View file

@ -25,142 +25,93 @@ InputEventSpy::~InputEventSpy()
void InputEventSpy::pointerEvent(MouseEvent *event)
{
Q_UNUSED(event)
}
void InputEventSpy::wheelEvent(WheelEvent *event)
{
Q_UNUSED(event)
}
void InputEventSpy::keyEvent(KeyEvent *event)
{
Q_UNUSED(event)
}
void InputEventSpy::touchDown(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
}
void InputEventSpy::touchMotion(qint32 id, const QPointF &point, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(point)
Q_UNUSED(time)
}
void InputEventSpy::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)
}
void InputEventSpy::pinchGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
}
void InputEventSpy::pinchGestureUpdate(qreal scale, qreal angleDelta, const QPointF &delta, quint32 time)
{
Q_UNUSED(scale)
Q_UNUSED(angleDelta)
Q_UNUSED(delta)
Q_UNUSED(time)
}
void InputEventSpy::pinchGestureEnd(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::pinchGestureCancelled(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::swipeGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
}
void InputEventSpy::swipeGestureUpdate(const QPointF &delta, quint32 time)
{
Q_UNUSED(delta)
Q_UNUSED(time)
}
void InputEventSpy::swipeGestureEnd(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::swipeGestureCancelled(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::holdGestureBegin(int fingerCount, quint32 time)
{
Q_UNUSED(fingerCount)
Q_UNUSED(time)
}
void InputEventSpy::holdGestureEnd(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::holdGestureCancelled(quint32 time)
{
Q_UNUSED(time)
}
void InputEventSpy::switchEvent(SwitchEvent *event)
{
Q_UNUSED(event)
}
void InputEventSpy::tabletToolEvent(TabletEvent *event)
{
Q_UNUSED(event)
}
void InputEventSpy::tabletToolButtonEvent(uint button, bool pressed, const TabletToolId &tabletToolId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletToolId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadButtonEvent(uint button, bool pressed, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadStripEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
void InputEventSpy::tabletPadRingEvent(int number, int position, bool isFinger, const TabletPadId &tabletPadId, uint time)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
Q_UNUSED(time)
}
}

View file

@ -314,7 +314,6 @@ void InputMethod::textInputInterfaceV2StateUpdated(quint32 serial, KWaylandServe
if (!m_enabled) {
return;
}
Q_UNUSED(serial);
auto t2 = waylandServer()->seat()->textInputV2();
auto inputContext = waylandServer()->inputMethod()->context();
@ -434,8 +433,6 @@ static quint32 keysymToKeycode(quint32 sym)
void InputMethod::keysymReceived(quint32 serial, quint32 time, quint32 sym, bool pressed, quint32 modifiers)
{
Q_UNUSED(serial)
Q_UNUSED(time)
auto t2 = waylandServer()->seat()->textInputV2();
if (t2 && t2->isEnabled()) {
if (pressed) {
@ -457,7 +454,6 @@ void InputMethod::keysymReceived(quint32 serial, quint32 time, quint32 sym, bool
void InputMethod::commitString(qint32 serial, const QString &text)
{
Q_UNUSED(serial)
if (auto t2 = waylandServer()->seat()->textInputV2(); t2 && t2->isEnabled()) {
t2->commitString(text.toUtf8());
t2->preEdit({}, {});
@ -533,7 +529,6 @@ void InputMethod::setCursorPosition(qint32 index, qint32 anchor)
void InputMethod::setLanguage(uint32_t serial, const QString &language)
{
Q_UNUSED(serial)
auto t2 = waylandServer()->seat()->textInputV2();
if (t2 && t2->isEnabled()) {
t2->setLanguage(language.toUtf8());
@ -542,7 +537,6 @@ void InputMethod::setLanguage(uint32_t serial, const QString &language)
void InputMethod::setTextDirection(uint32_t serial, Qt::LayoutDirection direction)
{
Q_UNUSED(serial)
auto t2 = waylandServer()->seat()->textInputV2();
if (t2 && t2->isEnabled()) {
t2->setTextDirection(direction);
@ -578,7 +572,6 @@ void InputMethod::setPreeditStyling(quint32 index, quint32 length, quint32 style
void InputMethod::setPreeditString(uint32_t serial, const QString &text, const QString &commit)
{
Q_UNUSED(serial)
auto t2 = waylandServer()->seat()->textInputV2();
if (t2 && t2->isEnabled()) {
t2->preEdit(text.toUtf8(), commit.toUtf8());
@ -626,7 +619,6 @@ void InputMethod::key(quint32 /*serial*/, quint32 /*time*/, quint32 keyCode, boo
void InputMethod::modifiers(quint32 serial, quint32 mods_depressed, quint32 mods_latched, quint32 mods_locked, quint32 group)
{
Q_UNUSED(serial)
auto xkb = input()->keyboard()->xkb();
xkb->updateModifiers(mods_depressed, mods_latched, mods_locked, group);
}

View file

@ -52,7 +52,6 @@ void InputPanelV1Window::showOverlayPanel()
void InputPanelV1Window::showTopLevel(OutputInterface *output, InputPanelSurfaceV1Interface::Position position)
{
Q_UNUSED(position);
m_mode = Mode::VirtualKeyboard;
setOutput(output);
maybeShow();
@ -191,7 +190,6 @@ void InputPanelV1Window::setOutput(OutputInterface *outputIface)
void InputPanelV1Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
{
Q_UNUSED(mode)
updateGeometry(rect);
}

View file

@ -160,8 +160,6 @@ QSizeF InternalWindow::maxSize() const
NET::WindowType InternalWindow::windowType(bool direct, int supported_types) const
{
Q_UNUSED(direct)
Q_UNUSED(supported_types)
return m_windowType;
}
@ -295,7 +293,6 @@ void InternalWindow::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
Window *InternalWindow::findModal(bool allow_itself)
{
Q_UNUSED(allow_itself)
return nullptr;
}
@ -435,7 +432,6 @@ bool InternalWindow::acceptsFocus() const
bool InternalWindow::belongsToSameApplication(const Window *other, SameApplicationChecks checks) const
{
Q_UNUSED(checks)
const InternalWindow *otherInternal = qobject_cast<const InternalWindow *>(other);
if (!otherInternal) {
return false;

View file

@ -113,13 +113,11 @@ QModelIndex EffectsModel::index(int row, int column, const QModelIndex &parent)
QModelIndex EffectsModel::parent(const QModelIndex &child) const
{
Q_UNUSED(child)
return {};
}
int EffectsModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return 1;
}
@ -651,7 +649,6 @@ void EffectsModel::requestConfigure(const QModelIndex &index, QWindow *transient
bool EffectsModel::shouldStore(const EffectData &data) const
{
Q_UNUSED(data)
return true;
}

View file

@ -339,7 +339,6 @@ void PreviewClient::setBordersTopEdge(bool enabled)
void PreviewClient::requestShowToolTip(const QString &text)
{
Q_UNUSED(text);
}
void PreviewClient::requestHideToolTip()
@ -385,19 +384,15 @@ void PreviewClient::requestToggleKeepBelow()
void PreviewClient::requestShowWindowMenu(const QRect &rect)
{
Q_UNUSED(rect)
Q_EMIT showWindowMenuRequested();
}
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
{
Q_UNUSED(rect);
Q_UNUSED(actionId);
}
void PreviewClient::showApplicationMenu(int actionId)
{
Q_UNUSED(actionId)
}
void PreviewClient::requestToggleOnAllDesktops()

View file

@ -28,7 +28,6 @@ QHash<int, QByteArray> RuleBookModel::roleNames() const
int RuleBookModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_ruleBook->ruleCount();
}

View file

@ -255,9 +255,6 @@ void Monitor::Corner::mousePressEvent(QGraphicsSceneMouseEvent *e)
void Monitor::Corner::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option)
Q_UNUSED(widget)
if (m_hover) {
button->setElementPrefix("normal");
@ -290,14 +287,12 @@ void Monitor::Corner::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
void Monitor::Corner::hoverEnterEvent(QGraphicsSceneHoverEvent *e)
{
Q_UNUSED(e);
m_hover = true;
update();
}
void Monitor::Corner::hoverLeaveEvent(QGraphicsSceneHoverEvent *e)
{
Q_UNUSED(e);
m_hover = false;
update();
}

View file

@ -107,13 +107,11 @@ QRect ScreenPreviewWidget::previewRect() const
void ScreenPreviewWidget::resizeEvent(QResizeEvent *e)
{
Q_UNUSED(e)
d->updateScreenGraphics();
}
void ScreenPreviewWidget::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
if (d->monitorRect.size().isEmpty()) {
return;
}

View file

@ -182,7 +182,6 @@ QString ExampleClientModel::longestCaption() const
int ExampleClientModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_thumbnails.size();
}

View file

@ -42,7 +42,6 @@ void WindowThumbnailItem::setWId(qulonglong wId)
void WindowThumbnailItem::setClipTo(QQuickItem *clip)
{
Q_UNUSED(clip)
qWarning() << "ThumbnailItem.clipTo is removed and it has no replacements";
}
@ -83,7 +82,6 @@ void WindowThumbnailItem::findImage()
QSGNode *WindowThumbnailItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
{
Q_UNUSED(updatePaintNodeData)
auto *node = static_cast<QSGImageNode *>(oldNode);
if (!node) {
node = window()->createImageNode();
@ -120,13 +118,11 @@ QSize WindowThumbnailItem::sourceSize() const
void WindowThumbnailItem::setBrightness(qreal brightness)
{
Q_UNUSED(brightness)
qWarning() << "ThumbnailItem.brightness is removed. Use a shader effect to change brightness";
}
void WindowThumbnailItem::setSaturation(qreal saturation)
{
Q_UNUSED(saturation)
qWarning() << "ThumbnailItem.saturation is removed. Use a shader effect to change saturation";
}

View file

@ -23,8 +23,6 @@ KcmVirtualKeyboard::KcmVirtualKeyboard(QObject *parent, const QVariantList &args
, m_data(new VirtualKeyboardData(this))
, m_model(new VirtualKeyboardsModel(this))
{
Q_UNUSED(args)
qmlRegisterAnonymousType<VirtualKeyboardSettings>("org.kde.kwin.virtualkeyboardsettings", 1);
setAboutData(new KAboutData(QStringLiteral("kcm_virtualkeyboard"),

View file

@ -79,7 +79,6 @@ GlobalPolicy::GlobalPolicy(Xkb *xkb, KeyboardLayout *_layout, const KConfigGroup
: Policy(xkb, _layout, config)
{
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this, xkb](const QString &name) {
Q_UNUSED(name)
clearLayouts();
if (const uint layout = xkb->currentLayout()) {
m_config.writeEntry(defaultLayoutEntryKey(), layout);
@ -87,7 +86,6 @@ GlobalPolicy::GlobalPolicy(Xkb *xkb, KeyboardLayout *_layout, const KConfigGroup
});
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
Q_UNUSED(name)
if (xkb->numberOfLayouts() > 1) {
setLayout(m_config.readEntry(defaultLayoutEntryKey(), 0));
}
@ -103,7 +101,6 @@ VirtualDesktopPolicy::VirtualDesktopPolicy(Xkb *xkb, KeyboardLayout *layout, con
this, &VirtualDesktopPolicy::desktopChanged);
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
Q_UNUSED(name)
clearLayouts();
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
@ -114,7 +111,6 @@ VirtualDesktopPolicy::VirtualDesktopPolicy(Xkb *xkb, KeyboardLayout *layout, con
});
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
Q_UNUSED(name)
if (xkb->numberOfLayouts() > 1) {
const auto &desktops = VirtualDesktopManager::self()->desktops();
for (KWin::VirtualDesktop *const desktop : desktops) {
@ -236,7 +232,6 @@ ApplicationPolicy::ApplicationPolicy(KWin::Xkb *xkb, KWin::KeyboardLayout *layou
connect(workspace(), &Workspace::windowActivated, this, &ApplicationPolicy::windowActivated);
connect(workspace()->sessionManager(), &SessionManager::prepareSessionSaveRequested, this, [this](const QString &name) {
Q_UNUSED(name)
clearLayouts();
for (auto i = m_layouts.constBegin(); i != m_layouts.constEnd(); ++i) {
@ -250,7 +245,6 @@ ApplicationPolicy::ApplicationPolicy(KWin::Xkb *xkb, KWin::KeyboardLayout *layou
});
connect(workspace()->sessionManager(), &SessionManager::loadSessionRequested, this, [this, xkb](const QString &name) {
Q_UNUSED(name)
if (xkb->numberOfLayouts() > 1) {
const QString keyPrefix = defaultLayoutEntryKey();
const QStringList keyList = m_config.keyList().filter(keyPrefix);

View file

@ -71,7 +71,6 @@ protected:
}
void layoutChanged(uint index) override
{
Q_UNUSED(index)
}
private:

View file

@ -431,6 +431,14 @@ bool AnimationEffect::cancel(quint64 animationId)
return false;
}
void AnimationEffect::animationEnded(EffectWindow *w, Attribute a, uint meta)
{
}
void AnimationEffect::genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta)
{
}
void AnimationEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
{
Q_D(AnimationEffect);

View file

@ -466,12 +466,7 @@ protected:
* @param meta Originally supplied metadata to animate() or set().
* @since 4.8
*/
virtual void animationEnded(EffectWindow *w, Attribute a, uint meta)
{
Q_UNUSED(w);
Q_UNUSED(a);
Q_UNUSED(meta);
}
virtual void animationEnded(EffectWindow *w, Attribute a, uint meta);
/**
* Cancels a running animation.
@ -499,13 +494,7 @@ protected:
* @param meta The metadata.
* @since 4.8
*/
virtual void genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta)
{
Q_UNUSED(w);
Q_UNUSED(data);
Q_UNUSED(progress);
Q_UNUSED(meta);
}
virtual void genericAnimation(EffectWindow *w, WindowPaintData &data, float progress, uint meta);
/**
* @internal

View file

@ -602,71 +602,46 @@ xcb_window_t Effect::x11RootWindow() const
bool Effect::touchDown(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
return false;
}
bool Effect::touchMotion(qint32 id, const QPointF &pos, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(pos)
Q_UNUSED(time)
return false;
}
bool Effect::touchUp(qint32 id, quint32 time)
{
Q_UNUSED(id)
Q_UNUSED(time)
return false;
}
bool Effect::perform(Feature feature, const QVariantList &arguments)
{
Q_UNUSED(feature)
Q_UNUSED(arguments)
return false;
}
bool Effect::tabletToolEvent(QTabletEvent *event)
{
Q_UNUSED(event)
return false;
}
bool Effect::tabletToolButtonEvent(uint button, bool pressed, quint64 tabletToolId)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletToolId)
return false;
}
bool Effect::tabletPadButtonEvent(uint button, bool pressed, void *tabletPadId)
{
Q_UNUSED(button)
Q_UNUSED(pressed)
Q_UNUSED(tabletPadId)
return false;
}
bool Effect::tabletPadStripEvent(int number, int position, bool isFinger, void *tabletPadId)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
return false;
}
bool Effect::tabletPadRingEvent(int number, int position, bool isFinger, void *tabletPadId)
{
Q_UNUSED(number)
Q_UNUSED(position)
Q_UNUSED(isFinger)
Q_UNUSED(tabletPadId)
return false;
}
@ -1474,7 +1449,6 @@ QRectF WindowMotionManager::targetGeometry(EffectWindow *w) const
EffectWindow *WindowMotionManager::windowAtPoint(QPoint point, bool useStackingOrder) const
{
Q_UNUSED(useStackingOrder);
// TODO: Stacking order uses EffectsHandler::stackingOrder() then filters by m_managedWindows
QHash<EffectWindow *, WindowMotion>::ConstIterator it = m_managedWindows.constBegin();
while (it != m_managedWindows.constEnd()) {

View file

@ -86,9 +86,6 @@ static void initDebugOutput()
GLenum severity, GLsizei length,
const GLchar *message,
const GLvoid *userParam) {
Q_UNUSED(source)
Q_UNUSED(severity)
Q_UNUSED(userParam)
while (length && std::isspace(message[length - 1])) {
--length;
}
@ -303,7 +300,6 @@ bool GLShader::link()
const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &source) const
{
Q_UNUSED(shaderType)
// Prepare the source code
QByteArray ba;
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) {

View file

@ -77,13 +77,11 @@ static GLenum GetGraphicsResetStatus()
static void ReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
GLenum type, GLsizei bufSize, GLvoid *data)
{
Q_UNUSED(bufSize)
glReadPixels(x, y, width, height, format, type, data);
}
static void GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
{
Q_UNUSED(bufSize)
glGetUniformfv(program, location, params);
}

View file

@ -77,10 +77,6 @@ void OffscreenEffect::unredirect(EffectWindow *window)
void OffscreenEffect::apply(EffectWindow *window, int mask, WindowPaintData &data, WindowQuadList &quads)
{
Q_UNUSED(window)
Q_UNUSED(mask)
Q_UNUSED(data)
Q_UNUSED(quads)
}
void OffscreenData::maybeRender(EffectWindow *window)
@ -279,8 +275,6 @@ CrossFadeEffect::~CrossFadeEffect()
void CrossFadeEffect::drawWindow(EffectWindow *window, int mask, const QRegion &region, WindowPaintData &data)
{
Q_UNUSED(mask)
CrossFadeWindowData *offscreenData = d->windows.value(window);
// paint the new window (if applicable) underneath

View file

@ -299,8 +299,6 @@ void QuickSceneEffect::activateView(QuickSceneView *view)
// Screen views are repainted just before kwin performs its compositing cycle to avoid stalling for vblank
void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseconds presentTime)
{
Q_UNUSED(presentTime)
if (effects->waylandDisplay()) {
QuickSceneView *screenView = d->views.value(data.screen);
if (screenView && screenView->isDirty()) {
@ -319,9 +317,6 @@ void QuickSceneEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::mil
void QuickSceneEffect::paintScreen(int mask, const QRegion &region, ScreenPaintData &data)
{
Q_UNUSED(mask)
Q_UNUSED(region)
if (effects->waylandDisplay()) {
QuickSceneView *screenView = d->views.value(data.screen());
if (screenView) {
@ -341,7 +336,6 @@ bool QuickSceneEffect::isActive() const
QVariantMap QuickSceneEffect::initialProperties(EffectScreen *screen)
{
Q_UNUSED(screen)
return QVariantMap();
}

View file

@ -39,9 +39,6 @@ LinuxDmaBufV1RendererInterface::~LinuxDmaBufV1RendererInterface()
KWaylandServer::LinuxDmaBufV1ClientBuffer *LinuxDmaBufV1RendererInterface::importBuffer(DmaBufAttributes &&attrs, quint32 flags)
{
Q_UNUSED(attrs)
Q_UNUSED(flags)
return nullptr;
}

View file

@ -574,7 +574,6 @@ bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
bool XcbEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result)
#endif
{
Q_UNUSED(result)
if (eventType == "xcb_generic_event_t") {
return kwinApp()->dispatchEvent(static_cast<xcb_generic_event_t *>(message));
}

View file

@ -89,7 +89,6 @@ void ModifierOnlyShortcuts::pointerEvent(MouseEvent *event)
void ModifierOnlyShortcuts::wheelEvent(WheelEvent *event)
{
Q_UNUSED(event)
reset();
}

Some files were not shown because too many files have changed in this diff Show more