const fix

This commit is contained in:
Patrick von Reth 2014-01-14 12:51:46 +01:00
parent ceb6a71066
commit 39e70977cf
3 changed files with 8 additions and 8 deletions

View File

@ -88,7 +88,7 @@ const Action &Notification::actionInvoked() const
return d->m_actionInvoked;
}
Application Notification::application() const
const Application &Notification::application() const
{
return d->m_application;
}
@ -103,7 +103,7 @@ QString Notification::text() const
return d->m_text;
}
Alert Notification::alert() const
const Alert &Notification::alert() const
{
return d->m_alert;
}

View File

@ -54,11 +54,11 @@ public:
const uint &updateID() const;
const Action &actionInvoked() const;
Application application() const;
const Application &application() const;
QString title() const;
QString text() const;
const Icon &icon() const;
Alert alert() const;
const Alert &alert() const;
void setSticky();
bool sticky() const;
const NotificationEnums::Prioritys::prioritys &priority() const;

View File

@ -115,13 +115,13 @@ SnarlNotification Parser::parse(QString &msg,QTcpSocket* client){
Application app;
Alert alert;
if(snarl->m_applications.contains(value))
if(snarl->m_applications.contains(appName))
{
app = snarl->m_applications[value];
app = snarl->m_applications[appName];
}
else
{
app = Application(value, icon);
app = Application(appName, icon);
}
if(app.alerts().contains(alertName))
@ -169,7 +169,7 @@ SnarlNotification Parser::parse(QString &msg,QTcpSocket* client){
qDebug()<<"Error registering alert with empty name";
break;
}
sNotification.notification.application().addAlert(sNotification.notification.alert());
snarl->m_applications[appName].addAlert(sNotification.notification.alert());
break;
case REGISTER:
if(sNotification.notification.application().isValid() && !snarl->m_applications.contains(sNotification.notification.application().name()))