summaryrefslogtreecommitdiff
path: root/ckitcallnotification/ckitcallprovider.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-26 02:36:09 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-26 02:36:09 +0200
commit0822b88738e00625efd27ccca9119885272924d2 (patch)
treef379817602cc23dd829c0aa4751b6b5edc348923 /ckitcallnotification/ckitcallprovider.cpp
parentcf5d24b94d96b722c6d76c2225293a56a50d3c2b (diff)
downloadsowatch-0822b88738e00625efd27ccca9119885272924d2.tar.gz
sowatch-0822b88738e00625efd27ccca9119885272924d2.zip
fixing bugs found during use ;)
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();