diff --git a/src/libsnore/plugins/snorebackend.cpp b/src/libsnore/plugins/snorebackend.cpp index 7454952..e7a3f16 100644 --- a/src/libsnore/plugins/snorebackend.cpp +++ b/src/libsnore/plugins/snorebackend.cpp @@ -194,7 +194,7 @@ void SnoreBackend::startTimeout(Notification ¬ification) //dont use a capture for notification, as it can leak uint id = notification.id(); connect(timer, &QTimer::timeout, [id](){ - Notification notification = SnoreCore::instance().activeNotificationById(id); + Notification notification = SnoreCore::instance().getActiveNotificationByID(id); if(notification.isValid()){ snoreDebug(SNORE_DEBUG) << notification; SnoreCore::instance().requestCloseNotification(notification, Notification::TIMED_OUT); diff --git a/src/libsnore/snore.cpp b/src/libsnore/snore.cpp index 2c4ca7d..d91a9e0 100644 --- a/src/libsnore/snore.cpp +++ b/src/libsnore/snore.cpp @@ -233,7 +233,7 @@ void SnoreCore::setDefaultValue(const QString &key, const QVariant &value, Setti } -Notification SnoreCore::activeNotificationById(uint id) const +Notification SnoreCore::getActiveNotificationByID(uint id) const { Q_D(const SnoreCore); return d->m_activeNotifications.value(id); diff --git a/src/libsnore/snore.h b/src/libsnore/snore.h index acdeda9..a214d36 100644 --- a/src/libsnore/snore.h +++ b/src/libsnore/snore.h @@ -150,7 +150,7 @@ public: void setValue(const QString &key, const QVariant &value, SettingsType type = GLOBAL_SETTING); void setDefaultValue(const QString &key, const QVariant &value, SettingsType type = GLOBAL_SETTING); - Notification activeNotificationById(uint id) const; + Notification getActiveNotificationByID(uint id) const; signals: /** * This signal is emitted when an action on the Notification was performed. diff --git a/src/plugins/backends/growl/growlbackend.cpp b/src/plugins/backends/growl/growlbackend.cpp index c40f5f3..fc3577b 100644 --- a/src/plugins/backends/growl/growlbackend.cpp +++ b/src/plugins/backends/growl/growlbackend.cpp @@ -45,7 +45,7 @@ bool GrowlBackend::initialize() s_instance = this; auto func = [](growl_callback_data *data)->void{ snoreDebug(SNORE_DEBUG) << data->id << QString(data->reason) << QString(data->data); - Notification n = Snore::SnoreCore::instance().activeNotificationById(data->id); + Notification n = Snore::SnoreCore::instance().getActiveNotificationByID(data->id); if (!n.isValid()) { return; } diff --git a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp index 6666b08..ec38b23 100644 --- a/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp +++ b/src/plugins/frontends/freedesktop/freedesktopnotificationfrontend.cpp @@ -124,7 +124,7 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id, } Notification noti; - Notification toReplace = SnoreCore::instance().activeNotificationById(replaces_id); + Notification toReplace = SnoreCore::instance().getActiveNotificationByID(replaces_id); if (replaces_id != 0 && toReplace.isValid()) { noti = Notification(toReplace, summary, body, icon, timeout == -1 ? Notification::defaultTimeout() : timeout / 1000, priotity); } else { @@ -141,7 +141,7 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id, void FreedesktopFrontend::CloseNotification(uint id) { - Notification noti = SnoreCore::instance().activeNotificationById(id); + Notification noti = SnoreCore::instance().getActiveNotificationByID(id); if (noti.isValid()) { SnoreCore::instance().requestCloseNotification(noti, Notification::TIMED_OUT); }