summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJamey Hicks <jamey.hicks@nokia.com>2012-02-28 09:57:26 -0500
committerQt by Nokia <qt-info@nokia.com>2012-03-16 17:39:22 +0100
commit6d12917862ee99ce05331d4b6ab481a3cd3a0b04 (patch)
tree1846d44d231bc3d3469f255f76c8f076f3b1fb8c /tools
parenteb6d35295b596445f7ece3f653b6415525dc6fe2 (diff)
Add support for old notifications to QJsonDbWatcher
Example, assuming stateNumber 2962 is in the recent past: QtJsonDb::QJsonDbWatcher *watcher = new QtJsonDb::QJsonDbWatcher; watcher->setQuery(QStringLiteral("[?_type=\"Foo\"]")); watcher->setInitialStateNumber(2962); connection->addWatcher(watcher); ... QList<QJsonDbNotification> event = watcher->takeNotifications(); If stateNumber is 0xFFFFFFFF, then sends a "create" notification for every object currently in the specified partition. Applications can use this to find all matching objects and all changes to those objects going forward. Fixes Bug #7276. Also fixes Bug #7300. Change-Id: Icd01d05f89c8480804ea8ef09061022f107091f1 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/jsondb-client/client.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/jsondb-client/client.cpp b/tools/jsondb-client/client.cpp
index b3459340..decc202b 100644
--- a/tools/jsondb-client/client.cpp
+++ b/tools/jsondb-client/client.cpp
@@ -269,6 +269,8 @@ void Client::onNotificationsAvailable(int)
actionString = QStringLiteral("update"); break;
case QtJsonDb::QJsonDbWatcher::Removed:
actionString = QStringLiteral("remove"); break;
+ case QtJsonDb::QJsonDbWatcher::StateChanged:
+ actionString = QStringLiteral("stateChange"); break;
case QtJsonDb::QJsonDbWatcher::All: break;
}