Flag unused parameters with Q_UNUSED()

This commit is contained in:
Marco Mattiolo 2024-08-12 14:14:46 +02:00 committed by Devin Lin
parent f726443f77
commit 4371c95194
6 changed files with 8 additions and 1 deletions

View file

@ -26,6 +26,7 @@ MobileShellSettings::MobileShellSettings(QObject *parent)
m_configWatcher = KConfigWatcher::create(m_config);
connect(m_configWatcher.data(), &KConfigWatcher::configChanged, this, [this](const KConfigGroup &group, const QByteArrayList &names) -> void {
Q_UNUSED(names)
if (group.name() == GENERAL_CONFIG_GROUP) {
Q_EMIT vibrationsEnabledChanged();
Q_EMIT vibrationDurationChanged();

View file

@ -39,6 +39,7 @@ WallpaperPlugin::WallpaperPlugin(QObject *parent)
}
connect(m_lockscreenConfigWatcher.data(), &KConfigWatcher::configChanged, this, [this](const KConfigGroup &group) {
Q_UNUSED(group)
loadLockscreenSettings();
});

View file

@ -173,6 +173,7 @@ void DelegateTouchArea::hoverLeaveEvent(QHoverEvent *event)
void DelegateTouchArea::handlePressEvent(QPointerEvent *event, QPointF point)
{
Q_UNUSED(event)
// ignore multiple press events
if (m_pressed) {
return;
@ -190,7 +191,7 @@ void DelegateTouchArea::handlePressEvent(QPointerEvent *event, QPointF point)
void DelegateTouchArea::handleReleaseEvent(QPointerEvent *event, bool click)
{
// NOTE: event can be nullptr!
Q_UNUSED(event)
bool wasPressed = m_pressed;
setPressed(false);
@ -208,6 +209,7 @@ void DelegateTouchArea::handleReleaseEvent(QPointerEvent *event, bool click)
void DelegateTouchArea::handleMoveEvent(QPointerEvent *event, QPointF point)
{
Q_UNUSED(event)
if (QPointF(point - m_mouseDownPosition).manhattanLength() >= QGuiApplication::styleHints()->startDragDistance()) {
m_pressAndHoldTimer->stop();
setPressed(false);

View file

@ -89,6 +89,7 @@ void ApplicationListModel::loadApplications()
QVariant ApplicationListModel::data(const QModelIndex &index, int role) const
{
Q_UNUSED(role)
if (!index.isValid()) {
return QVariant();
}

View file

@ -23,6 +23,7 @@ PinnedModel *PinnedModel::self()
int PinnedModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent)
return m_applications.count();
}

View file

@ -57,6 +57,7 @@ void EffectTouchBorder::setBorders(const QList<int> &touchActivateBorders)
effects->registerRealtimeTouchBorder(ElectricBorder(border),
m_state->activateAction(),
[this](ElectricBorder border, const QPointF &deltaProgress, const Output *screen) {
Q_UNUSED(screen)
m_state->setInProgress(true);
if (border == ElectricTop || border == ElectricBottom) {