use priority in nma

This commit is contained in:
Patrick von Reth 2015-04-24 10:03:56 +02:00
parent db3295ba92
commit 7ba599d7b8
2 changed files with 4 additions and 2 deletions

View File

@ -155,6 +155,7 @@ void Notification::addActiveIn(const QObject *o)
Q_ASSERT_X(contains,Q_FUNC_INFO,"already active");
if(contains) {
snoreDebug(SNORE_WARNING) << o << "already active in" << id();
return;
}
d->m_activeIn.insert(o);
SnoreCorePrivate::instance()->m_activeNotifications[id()] = *this;

View File

@ -48,11 +48,12 @@ void NotifyMyAndroid::slotNotify(Notification notification)
request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/x-www-form-urlencoded"));
// TODO: use toHTML?
QString data(QString("apikey=%1&application=%2&event=%3&description=%4&content-type=text/html")
QString data(QString("apikey=%1&application=%2&event=%3&description=%4&priority=%5&content-type=text/html")
.arg(key,
notification.application().name(),
Utils::toPlainText(notification.title()),
Utils::toPlainText(notification.text())));
Utils::toPlainText(notification.text()),
QString::number(notification.priority())));
QNetworkReply *reply = m_manager.post(request, data.toUtf8().constData());
connect(reply, &QNetworkReply::finished, [reply]() {