summaryrefslogtreecommitdiff
path: root/ckitcallnotification/ckitcallprovider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ckitcallnotification/ckitcallprovider.cpp')
-rw-r--r--ckitcallnotification/ckitcallprovider.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ckitcallnotification/ckitcallprovider.cpp b/ckitcallnotification/ckitcallprovider.cpp
index 90dab97..acfcca3 100644
--- a/ckitcallnotification/ckitcallprovider.cpp
+++ b/ckitcallnotification/ckitcallprovider.cpp
@@ -22,8 +22,8 @@ void CKitCallProvider::activeCallChanged()
{
QVariantMap info = _activeCall->value().toMap();
qDebug() << "active call changed" << info;
- if (!info.contains("state")) {
- qWarning() << "broken active call context property";
+ if (!info.contains("state") || !info.value("status", false).toBool()) {
+ return; // Ignore until we get a map with all the required properties.
}
int state = info["state"].toInt();
if (state == 0) {
@@ -34,13 +34,15 @@ void CKitCallProvider::activeCallChanged()
}
// "Incoming call"
if (_notification) {
+ // An existing incoming call has been updated
_notification->changeDisplayName(displayName);
} else {
+ // This is a new incoming call
_notification = new CKitCallNotification(displayName, this);
emit incomingNotification(_notification);
}
} else {
- // Call is either answered, dropped, missed, ..
+ // Call has either been answered, rejected, missed, ..
if (_notification) {
_notification->clear();
_notification->deleteLater();