diff options
Diffstat (limited to 'libsowatch/watchserver.cpp')
-rw-r--r-- | libsowatch/watchserver.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libsowatch/watchserver.cpp b/libsowatch/watchserver.cpp index 07e4609..c81d937 100644 --- a/libsowatch/watchserver.cpp +++ b/libsowatch/watchserver.cpp @@ -68,6 +68,7 @@ void WatchServer::runWatchlet(const QString& id) void WatchServer::closeWatchlet() { if (_currentWatchlet) { + qDebug() << "deactivating watchlet" << _currentWatchlet->id(); _currentWatchlet->deactivate(); _currentWatchlet = 0; if (_watch->isConnected() && _pendingNotifications.empty()) { @@ -183,13 +184,13 @@ void WatchServer::notificationReceived(Notification *notification) connect(notification, SIGNAL(changed()), SLOT(notificationChanged())); connect(notification, SIGNAL(cleared()), SLOT(notificationCleared())); - qDebug() << "notification received" << notification->title() << notification->count(); + qDebug() << "notification received" << notification->title() << "(" << notification->count() << ")"; _watch->updateNotificationCount(type, getNotificationCount(type)); QDateTime oldThreshold = QDateTime::currentDateTime().addSecs(-_oldNotificationThreshold); if (notification->dateTime() < oldThreshold) { - return; // Do not care about that old notifications... + return; // Do not care about notifications that old... } if (_pendingNotifications.isEmpty()) { @@ -211,7 +212,7 @@ void WatchServer::notificationChanged() Notification* n = static_cast<Notification*>(obj); const Notification::Type type = n->type(); - qDebug() << "notification changed" << n->title() << n->count(); + qDebug() << "notification changed" << n->title() << "(" << n->count() << ")"; _watch->updateNotificationCount(type, getNotificationCount(type)); if (!_pendingNotifications.isEmpty() && _pendingNotifications.head() == n) { @@ -228,11 +229,12 @@ void WatchServer::notificationCleared() const Notification::Type type = n->type(); _notifications[type].removeOne(n); - qDebug() << "notification deleted" << n->title() << n->count(); + qDebug() << "notification deleted" << n->title() << "(" << n->count() << ")"; _watch->updateNotificationCount(type, getNotificationCount(type)); - if (!_pendingNotifications.isEmpty() && _pendingNotifications.head() == n) {qDebug() << "removing top notification"; + if (!_pendingNotifications.isEmpty() && _pendingNotifications.head() == n) { + qDebug() << "removing top notification"; _pendingNotifications.removeAll(n); nextNotification(); } else { |