rename methode to be compatible with older version

This commit is contained in:
Patrick von Reth 2015-04-20 15:23:02 +02:00
parent dab3728eee
commit faf95d9ed3
5 changed files with 6 additions and 6 deletions

View File

@ -194,7 +194,7 @@ void SnoreBackend::startTimeout(Notification &notification)
//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);

View File

@ -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);

View File

@ -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.

View File

@ -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;
}

View File

@ -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);
}