make lint

This commit is contained in:
Loren Burkholder 2021-01-19 18:47:44 -05:00
parent b04a7fbef6
commit 7727c0d249

View File

@ -1,12 +1,12 @@
#include "notifications/Manager.h" #include "notifications/Manager.h"
#include <QDebug>
#include <QImage>
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusMessage> #include <QDBusMessage>
#include <QDBusMetaType> #include <QDBusMetaType>
#include <QDBusPendingCallWatcher> #include <QDBusPendingCallWatcher>
#include <QDBusPendingReply> #include <QDBusPendingReply>
#include <QDebug>
#include <QImage>
NotificationsManager::NotificationsManager(QObject *parent) NotificationsManager::NotificationsManager(QObject *parent)
: QObject(parent) : QObject(parent)
@ -75,14 +75,17 @@ NotificationsManager::postNotification(const QString &roomid,
static QDBusInterface notifyApp("org.freedesktop.Notifications", static QDBusInterface notifyApp("org.freedesktop.Notifications",
"/org/freedesktop/Notifications", "/org/freedesktop/Notifications",
"org.freedesktop.Notifications"); "org.freedesktop.Notifications");
auto call = auto call = notifyApp.asyncCallWithArgumentList("Notify", argumentList);
notifyApp.asyncCallWithArgumentList("Notify", argumentList);
QDBusPendingCallWatcher watcher{QDBusPendingReply{call}}; QDBusPendingCallWatcher watcher{QDBusPendingReply{call}};
connect(&watcher, &QDBusPendingCallWatcher::finished, this, [&watcher, this, &roomid, &eventid]() { connect(&watcher,
&QDBusPendingCallWatcher::finished,
this,
[&watcher, this, &roomid, &eventid]() {
if (watcher.reply().type() == QDBusMessage::ErrorMessage) if (watcher.reply().type() == QDBusMessage::ErrorMessage)
qDebug() << "D-Bus Error:" << watcher.reply().errorMessage(); qDebug() << "D-Bus Error:" << watcher.reply().errorMessage();
else else
notificationIds[watcher.reply().arguments().first().toUInt()] = roomEventId{roomid, eventid}; notificationIds[watcher.reply().arguments().first().toUInt()] =
roomEventId{roomid, eventid};
}); });
} }