Telephony "notifications" are now called "events"
This commit is contained in:
parent
12c0c940a7
commit
b30371d174
1 changed files with 5 additions and 5 deletions
|
@ -35,24 +35,24 @@ TelephonyPlugin::TelephonyPlugin(QObject *parent, const QVariantList &args)
|
||||||
KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
|
KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
|
||||||
{
|
{
|
||||||
|
|
||||||
QString npType = np.get<QString>("notificationType");
|
QString event = np.get<QString>("event");
|
||||||
|
|
||||||
QString title, content, type, icon;
|
QString title, content, type, icon;
|
||||||
bool transient;
|
bool transient;
|
||||||
|
|
||||||
title = device()->name();
|
title = device()->name();
|
||||||
|
|
||||||
if (npType == "ringing") {
|
if (event == "ringing") {
|
||||||
type = "callReceived";
|
type = "callReceived";
|
||||||
icon = "call-start";
|
icon = "call-start";
|
||||||
content = "Incoming call from " + np.get<QString>("phoneNumber","unknown number");
|
content = "Incoming call from " + np.get<QString>("phoneNumber","unknown number");
|
||||||
transient = false;
|
transient = false;
|
||||||
} else if (npType == "missedCall") {
|
} else if (event == "missedCall") {
|
||||||
type = "missedCall";
|
type = "missedCall";
|
||||||
icon = "call-start";
|
icon = "call-start";
|
||||||
content = "Missed call from " + np.get<QString>("phoneNumber","unknown number");
|
content = "Missed call from " + np.get<QString>("phoneNumber","unknown number");
|
||||||
transient = true;
|
transient = true;
|
||||||
} else if (npType == "sms") {
|
} else if (event == "sms") {
|
||||||
type = "smsReceived";
|
type = "smsReceived";
|
||||||
icon = "mail-receive";
|
icon = "mail-receive";
|
||||||
content = "SMS from "
|
content = "SMS from "
|
||||||
|
@ -64,7 +64,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
|
||||||
//TODO: return NULL if !debug
|
//TODO: return NULL if !debug
|
||||||
type = "unknownEvent";
|
type = "unknownEvent";
|
||||||
icon = "pda";
|
icon = "pda";
|
||||||
content = "Unknown notification type: " + npType;
|
content = "Unknown notification type: " + event;
|
||||||
transient = false;
|
transient = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue