summary refs log tree commit diff
path: root/src/notifications/ManagerLinux.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 23:22:01 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 23:22:01 +0100
commit5743a6de04b545b4573f61754461d1c271856001 (patch)
tree68710950de3cf82d166146eb0701905ca3fab3f4 /src/notifications/ManagerLinux.cpp
parentMerge pull request #855 from rnhmjoj/master (diff)
downloadnheko-5743a6de04b545b4573f61754461d1c271856001.tar.xz
Cleanup remaining clazy issues
Diffstat (limited to 'src/notifications/ManagerLinux.cpp')
-rw-r--r--src/notifications/ManagerLinux.cpp14
1 files changed, 9 insertions, 5 deletions
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<QImage>(); + // 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,