From 5743a6de04b545b4573f61754461d1c271856001 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 28 Dec 2021 23:22:01 +0100 Subject: Cleanup remaining clazy issues --- src/notifications/ManagerLinux.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/notifications/ManagerLinux.cpp') diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index 29e9a5b7..9bbd851a 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -34,13 +34,15 @@ NotificationsManager::NotificationsManager(QObject *parent) QDBusConnection::sessionBus(), this) , hasMarkup_{std::invoke([this]() -> bool { - for (auto x : dbus.call("GetCapabilities").arguments()) + auto caps = dbus.call("GetCapabilities").arguments(); + for (const auto &x : qAsConst(caps)) if (x.toStringList().contains("body-markup")) return true; return false; })} , hasImages_{std::invoke([this]() -> bool { - for (auto x : dbus.call("GetCapabilities").arguments()) + auto caps = dbus.call("GetCapabilities").arguments(); + for (const auto &x : qAsConst(caps)) if (x.toStringList().contains("body-images")) return true; return false; @@ -48,24 +50,26 @@ NotificationsManager::NotificationsManager(QObject *parent) { qDBusRegisterMetaType(); + // clang-format off QDBusConnection::sessionBus().connect("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", "ActionInvoked", this, - SLOT(actionInvoked(uint, QString))); + SLOT(actionInvoked(uint,QString))); QDBusConnection::sessionBus().connect("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", "NotificationClosed", this, - SLOT(notificationClosed(uint, uint))); + SLOT(notificationClosed(uint,uint))); QDBusConnection::sessionBus().connect("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", "NotificationReplied", this, - SLOT(notificationReplied(uint, QString))); + SLOT(notificationReplied(uint,QString))); + // clang-format on connect(this, &NotificationsManager::systemPostNotificationCb, -- cgit 1.5.1