summaryrefslogtreecommitdiff
path: root/sowatchui/watchesmodel.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-09 19:21:39 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-09 19:21:39 +0200
commit67c0ceaa7562310a62a7d11e96f1d558950660b5 (patch)
tree74e67a28c49447db1bda1907d00c57f796703195 /sowatchui/watchesmodel.cpp
parent118cb64416eb3bbbfee47bd3c618fc8825d85f54 (diff)
downloadsowatch-67c0ceaa7562310a62a7d11e96f1d558950660b5.tar.gz
sowatch-67c0ceaa7562310a62a7d11e96f1d558950660b5.zip
prepare watchlet/notif lists
Diffstat (limited to 'sowatchui/watchesmodel.cpp')
-rw-r--r--sowatchui/watchesmodel.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/sowatchui/watchesmodel.cpp b/sowatchui/watchesmodel.cpp
index 69de3a0..617e262 100644
--- a/sowatchui/watchesmodel.cpp
+++ b/sowatchui/watchesmodel.cpp
@@ -34,6 +34,7 @@ WatchesModel::~WatchesModel()
int WatchesModel::rowCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent);
return _list.count();
}
@@ -75,6 +76,9 @@ QVariant WatchesModel::data(const QModelIndex &index, int role) const
bool WatchesModel::removeRows(int row, int count, const QModelIndex &parent)
{
+ Q_UNUSED(row);
+ Q_UNUSED(count);
+ Q_UNUSED(parent);
return false; // TODO
}
@@ -90,11 +94,18 @@ void WatchesModel::addFoundWatch(const QVariantMap &info)
name = base.arg(num);
}
+ // Load the autodetected settings
ConfigKey* newkey = _config->getSubkey(name);
foreach (const QString& key, info.keys()) {
newkey->set(key, info[key]);
}
+ // Set some defaults
+ Registry *registry = Registry::registry();
+ foreach (const QStringList& providerId, registry->allNotificationProviders()) {
+ qDebug() << "Would add" << providerId;
+ }
+
// Now add to active watches
QStringList active = _active_watches->value().toStringList();
active << name;