Commit 63c45b92 authored by Méven Car's avatar Méven Car
Browse files

KWinWaylandBackend: fix a few warnings in findDevices

parent b4b71eea
Pipeline #170433 passed with stage
in 2 minutes and 37 seconds
......@@ -54,17 +54,17 @@ KWinWaylandBackend::~KWinWaylandBackend()
void KWinWaylandBackend::findDevices()
{
QStringList devicesSysNames;
const QVariant reply = m_deviceManager->property("devicesSysNames");
if (reply.isValid()) {
const QVariant replyDevicesSysNames = m_deviceManager->property("devicesSysNames");
if (replyDevicesSysNames.isValid()) {
qCDebug(KCM_MOUSE) << "Devices list received successfully from KWin.";
devicesSysNames = reply.toStringList();
devicesSysNames = replyDevicesSysNames.toStringList();
} else {
qCCritical(KCM_MOUSE) << "Error on receiving device list from KWin.";
m_errorString = i18n("Querying input devices failed. Please reopen this settings module.");
return;
}
for (QString sn : devicesSysNames) {
for (const QString &sn : qAsConst(devicesSysNames)) {
QDBusInterface deviceIface(QStringLiteral("org.kde.KWin"),
QStringLiteral("/org/kde/KWin/InputDevice/") + sn,
QStringLiteral("org.kde.KWin.InputDevice"),
......
......@@ -58,7 +58,7 @@ Qt::MouseButtons valueLoaderPart(QVariant const &reply)
}
}
KWinWaylandDevice::KWinWaylandDevice(QString dbusName)
KWinWaylandDevice::KWinWaylandDevice(const QString &dbusName)
{
m_iface = new QDBusInterface(QStringLiteral("org.kde.KWin"),
QStringLiteral("/org/kde/KWin/InputDevice/") + dbusName,
......
......@@ -57,7 +57,7 @@ class KWinWaylandDevice : public QObject
Q_PROPERTY(qreal scrollFactor READ scrollFactor WRITE setScrollFactor NOTIFY scrollFactorChanged)
public:
KWinWaylandDevice(QString dbusName);
KWinWaylandDevice(const QString &dbusName);
~KWinWaylandDevice() override;
bool init();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment