rename methode to be compatible with older version
This commit is contained in:
parent
dab3728eee
commit
faf95d9ed3
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue