summaryrefslogtreecommitdiff
path: root/sowatchd
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-11 01:10:25 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-11 01:10:25 +0200
commitf0564ad9d210cc68bfb1bfc6e56b86fa941ad830 (patch)
tree0401716e7af8be4318be1b9e88eca1cc8ad28d39 /sowatchd
parent1b8f2a0e2e63b1f881b6ba7b18982353b9c27b19 (diff)
downloadsowatch-f0564ad9d210cc68bfb1bfc6e56b86fa941ad830.tar.gz
sowatch-f0564ad9d210cc68bfb1bfc6e56b86fa941ad830.zip
more fixes
Diffstat (limited to 'sowatchd')
-rw-r--r--sowatchd/watchhandler.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/sowatchd/watchhandler.cpp b/sowatchd/watchhandler.cpp
index 4bebb9c..b04c90b 100644
--- a/sowatchd/watchhandler.cpp
+++ b/sowatchd/watchhandler.cpp
@@ -108,7 +108,7 @@ void WatchHandler::updateWatchlets()
delete subconfig;
}
- qDebug() << "Watchlets reloaded";
+ qDebug() << "Watchlets reloaded: " << _watchlets.keys();
}
void WatchHandler::updateProviders()
@@ -122,9 +122,13 @@ void WatchHandler::updateProviders()
QSet<QString> removed = curProviders - newProviders;
QSet<QString> added = newProviders - curProviders;
+ qDebug() << "Providers to remove: " << removed;
+ qDebug() << "Providers to add: " << added;
+
foreach (const QString& s, removed) {
NotificationProvider *provider = _providers[s];
_server->removeProvider(provider);
+ _providers.remove(s);
delete provider;
}
@@ -140,13 +144,17 @@ void WatchHandler::updateProviders()
_providers[s] = provider;
delete subconfig;
}
+
+ qDebug() << "Providers reloaded: " << _providers.keys();
}
void WatchHandler::handleConfigSubkeyChanged(const QString &subkey)
{
if (subkey == "watchlets") {
+ qDebug() << "Watchlets list changed";
updateWatchlets();
} else if (subkey == "providers") {
+ qDebug() << "Providers list changed";
updateProviders();
} else if (subkey == "next-watchlet-button" && _server) {
_server->setNextWatchletButton(_config->value("next-watchlet-button").toString());