Telephony "notifications" are now called "events"

This commit is contained in:
Albert Vaca 2013-08-16 06:23:03 +02:00
parent 12c0c940a7
commit b30371d174

View file

@ -35,24 +35,24 @@ TelephonyPlugin::TelephonyPlugin(QObject *parent, const QVariantList &args)
KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
{
QString npType = np.get<QString>("notificationType");
QString event = np.get<QString>("event");
QString title, content, type, icon;
bool transient;
title = device()->name();
if (npType == "ringing") {
if (event == "ringing") {
type = "callReceived";
icon = "call-start";
content = "Incoming call from " + np.get<QString>("phoneNumber","unknown number");
transient = false;
} else if (npType == "missedCall") {
} else if (event == "missedCall") {
type = "missedCall";
icon = "call-start";
content = "Missed call from " + np.get<QString>("phoneNumber","unknown number");
transient = true;
} else if (npType == "sms") {
} else if (event == "sms") {
type = "smsReceived";
icon = "mail-receive";
content = "SMS from "
@ -64,7 +64,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
//TODO: return NULL if !debug
type = "unknownEvent";
icon = "pda";
content = "Unknown notification type: " + npType;
content = "Unknown notification type: " + event;
transient = false;
}