diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-26 02:36:09 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-26 02:36:09 +0200 |
commit | 0822b88738e00625efd27ccca9119885272924d2 (patch) | |
tree | f379817602cc23dd829c0aa4751b6b5edc348923 /ckitcallnotification | |
parent | cf5d24b94d96b722c6d76c2225293a56a50d3c2b (diff) | |
download | sowatch-0822b88738e00625efd27ccca9119885272924d2.tar.gz sowatch-0822b88738e00625efd27ccca9119885272924d2.zip |
fixing bugs found during use ;)
Diffstat (limited to 'ckitcallnotification')
-rw-r--r-- | ckitcallnotification/ckitcallprovider.cpp | 8 |
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(); |