summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-247-168/+168
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I8e8328d8df56e83f13b19858434aeb6e5f888f30 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* switch to new-style configure testsOswald Buddenhagen2012-06-271-1/+1
| | | | | | | Change-Id: I6e22f8b74d769315d635738dcdef038e61c80e0f Reviewed-by: Jing Bai <jing.t.bai@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* .pro file clean upsTapani Mikola2012-06-121-1/+1
| | | | | | | | Daemon does not directly depend on qml. Jsondb-client does not directly depend on qml or gui. Change-Id: Ie7ce3c2564825b060f9ee481e8eb76f1c3b227ff Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* cleanup popRequestBai Jing2012-06-082-12/+22
| | | | | | | | | We should pop the request only if it is pushed to the stack and the request is finished or error occurrs. Change-Id: I124f15e0f246a1099992c4f89a5d7b5f35724753 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* fix jsondb-client doesn't quit properlyBai Jing2012-06-071-2/+2
| | | | | | | | | | When quiting while the thread is not running, it waits there forever This causes jsondb-client doesn't quit when it receives "quit" command Bug: 3539 Change-Id: Ibc4b6374c4faca0424a9ebb1a4b5a259b3572c73 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* add a missing popRequest to let jsondb-client quit properlyBai Jing2012-05-241-1/+2
| | | | | | | | | fix a problem when jsondb-client doesn't quit after failing to query with the query passed as command line parameter. Change-Id: I1cb0a982509b9b310a809af75fc88bc0c7de57a1 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Enable compile-time specification of jsondb socket name.Jamey Hicks2012-05-091-3/+0
| | | | | | | | | | To change the default jsondb socket name: qmake DEFINES+=JSONDB_SOCKET_NAME=/var/run/jsondb Fixes Bug #14089 Change-Id: Id628d1abce9a53e88008f3c6467c8271d90a65fd Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
* Improve error output when loading .json files with -loadKevin Simons2012-04-301-1/+10
| | | | | Change-Id: Ib490ef0f6cfb3b1a72d73b920fb8e1f335345420 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Add support for specifying the default partition to jsondb-clientKevin Simons2012-04-275-7/+40
| | | | | | | | Specifying -partition has no effect when loading a .qml file with -load. Change-Id: I1398208ca15d6c3ac39726393d86d48c0a069312 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Make jsondb-client a QCoreApplicationKevin Simons2012-04-241-18/+6
| | | | | | | | QQmlEngine no longer requires a QGuiApplication, so we can remove the horrible platform plugin hackery from jsondb-client. Change-Id: I2579bc59b9c7c45faaeb89021c005b8307b25fba Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Make sure the client exits when doing remove by queryKevin Simons2012-04-191-3/+6
| | | | | | | | | | Addresses the case where the query specified on the command line does not yield any objects. Fixes bug #6118 Change-Id: I68134a6ff34b7f06cfee7702eef107bd9de84556 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Test for libedit availabilityDonald Carr2012-04-111-2/+1
| | | | | | | | jsondb-client currently has a hard dependency on libedit; don't attempt to built this if libedit is not installed Change-Id: I8110c57b73d477757a2ca34be873241297ae8cb8 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Suppress some warningsKevin Simons2012-04-111-0/+1
| | | | | Change-Id: I8539aa0dfdd6a217f6ae331bf3fe19ff38d0e66e Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fixes stateNumber on historical notificationsJamey Hicks2012-04-021-2/+0
| | | | | | | | | | | | Also, eliminates magic initialStateNumber -1. If state number is specified and is less than current state, then notifications are sent for a summary historical changes. Starting from initial state 0 will yield all changes up to the current state. Fixes bug #7276 and bug #4665 Change-Id: Ica7fcfc5e6513c3854964a107fc81b032f535bec Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Print state information in jsondb-clientKevin Simons2012-03-281-7/+18
| | | | | Change-Id: Ie6993987faeefad4aa4b26c953dff7de371a04f9 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Make the client terminate properly when doing remove by queryKevin Simons2012-03-271-0/+3
| | | | | Change-Id: I93001b6826f4d1e4ef2601fae058718c19a27f88 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Add support for historical notifications to jsondb-clientKevin Simons2012-03-261-7/+20
| | | | | | Change-Id: Ia626c4a9a0088d8628becd6a5ea4639505ab4b77 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* QLatin1Literal -> QLatin1String in jsondb-clientKevin Simons2012-03-233-18/+18
| | | | | | | Also fixed a typo Change-Id: I6bd1a322f12d629b2998b36406018657a270a02c Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fixed build of aodbread toolDenis Dzyubenko2012-03-222-69/+25
| | | | | | Change-Id: I8700ecd23e133b8e1e13dd58488b19f718efca38 Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Add support for old notifications to QJsonDbWatcherJamey Hicks2012-03-161-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* Ported to using new declarative/qml apiDenis Dzyubenko2012-03-114-8/+8
| | | | | | | | | QtDeclarative and its classes were renamed to QtQml and QQml* classes. This patch fixes the usage in qtjsondb. Change-Id: I9f947fbe07189b0a4e0549b3a4c2e531c4a0ddda Reviewed-by: Jing Bai <jing.t.bai@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* CodeCoverage: Remove additional includes to header files.Caroline Chao2012-03-081-2/+0
| | | | | | | | | | | From change 8bf2c470806fb555e in qtbase, headers are not included in the code coverage instrumentation. Those changes in qtjsondb are now useless and can be removed. Change-Id: I8430d5625f24a19a08bdd46f07c48e695b44aba5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* jsondb-client: add remove (by query)Bai Jing2012-03-072-3/+37
| | | | | | | | Bug #6118 Change-Id: I07fc4043051fd201f2d59a6800fc812fa1ab9ba6 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix outdated and missing license headersSergio Ahumada2012-03-062-0/+82
| | | | | Change-Id: I47b057630767cf9346597a68a2516737d46392ef Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* remove redundant history cleanupBai Jing2012-03-061-6/+0
| | | | | | | Everything is done in run() Change-Id: I6f7618d508a2db3ffb8d75dc487a3fa32843f056 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* jsondb-client: fix a problem in creating .jsondb dirBai Jing2012-03-061-1/+9
| | | | | | | | | jsondb-client saves history in $HOME/.jsondb/history, but it doesn't check if .jsondb exists or not. Need to create this dir if it is not there yet. Change-Id: I0ff4ef5376b75f5bd9595093af95fe4f2eac1586 Reviewed-by: Jing Bai <jing.t.bai@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* jsondb-client: fix quit doesn't work properly problemBai Jing2012-03-051-0/+1
| | | | | | | Bug #3539 Change-Id: I95d11b25285be8f901128c227a72829619864855 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* jsondb-client: fix typo and add one exampleBai Jing2012-03-051-1/+2
| | | | | | | Bug #6132 Change-Id: I9e31d878fa37fcb414a772436a1a2b16de677610 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Removed obsolete actions from jsondb-client help screen.Denis Dzyubenko2012-03-051-10/+2
| | | | | | | | Also, cleaned up help output. Change-Id: I7bd38e19ae1aef520d9078e2173b79c68deb3fb2 Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* added load command to jsondb-client.Jamey Hicks2012-03-021-1/+11
| | | | | Change-Id: I5240d38a1615dfe70fa24122a4a0b13b424f69a6 Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* compile fix: explicitly link jsondb-client against guiBai Jing2012-02-291-1/+1
| | | | | Change-Id: I41989152070b400503069dd357082389cd45e7e0 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Move the -load functionality from the daemon to the clientKevin Simons2012-02-216-100/+439
| | | | | | | | | | Current we support 3 file formats: 1) .qml, providing the full JSONDB API 2) .json, simple JSON files whose objects get created in the DB 3) .js, deprecated format supporting the former server-side API Change-Id: I74905d26f909c6cf7e46ee2bd29926df035737ea Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Use QCryptographicHash in btreeJamey Hicks2012-02-141-1/+0
| | | | | | | Fixes bug https://bugreports.qt.nokia.com/browse/QTBUG-23890. Change-Id: I363916b162ad888045c55cee924353447fa655d1 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Implemented new c++ api for qtjsondb.Denis Dzyubenko2012-02-084-175/+193
| | | | | | | | The old api was not removed yet, but was moved to a separate qt5 module. It will be removed as soon as the rest of jsondb code doesn't depend on it. Change-Id: Icf190f378df476c33c40142503518ca043001d17 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Change the binary install path to use $$[QT_INSTALL_PREFIX]/binKevin Simons2012-02-062-2/+2
| | | | | | | | This handles the situation where Qt is configured with -sysroot and QT_INSTALL_BINS points outside the sysroot. Change-Id: Ie06d53f7aa080eca29ac10b0e584b060812e3af5 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* Fix missing and outdated license headers.Jason McDonald2012-01-281-3/+40
| | | | | Change-Id: I98041a8ec8672b67710ea565f695ede4f9d87b8e Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-274-4/+4
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I5ae1e9dd3cfde64171a7a7c5f8ceb88afd2ac7a2 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-234-4/+4
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ied95281fa94388f28c8a31ef2f43adb00fa403c2 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-054-4/+4
| | | | | | Change-Id: Icaa0a6029f47343297200eacc17cbf8d728d4975 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Renamed public macros.Denis Dzyubenko2012-01-041-1/+1
| | | | | | | | | | | | | | | | Renamed QT_ADDON_JSONDB_BEGIN_NAMESPACE to QT_BEGIN_NAMESPACE_JSONDB to ensure there is the same prefix for all those macros. "syncqt" app has some logic when it parses headers and it is easier to parse headers if the prefix matches. This is the first change that enables us to instruct syncqt to generate forward includes like "#include <JsonDbClient>" in addition to existing "#include <jsondb-client.h>" This change depends on http://codereview.qt-project.org/12127 Change-Id: I0700f58d53aa5c28193fc7ab93e36bdccd6983ed Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added JsonDbClient::errorStringDenis Dzyubenko2012-01-031-2/+2
| | | | | | | | | The function returns a description of the socket error. Change-Id: I071824d2f6d9496881a2fbfe8989e3e1dcfbbbad Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Added JsonDbClient::setAutoReconnect()Denis Dzyubenko2012-01-031-1/+6
| | | | | | | | | | | | Made it optional to automatically reconnect to the server if the connection is lost. Also added explicit connectToServer() and disconnectFromServer() functions. Change-Id: I578c2024f474b515e2dfa009ff4150020bc4378d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fixed QtJsonDb namespace compilation.Toby Tomkins2011-12-282-2/+2
| | | | | | Change-Id: I6bb93e635aac72f89efe6a91209595e0dd432709 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* printf and default case warning fixesAli Akhtarzada2011-12-071-0/+2
| | | | | | Change-Id: Ic968e36f3f7af37f1b908834d5c7d48897055c22 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* Added partition support to jsondb-client command-line appDenis Dzyubenko2011-12-071-11/+20
| | | | | | | Change-Id: Ib3a516d88daab91e5df23e0d10bd4b38c574d196 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Sanity-Review: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Polished JsonDbClient behaviorDenis Dzyubenko2011-11-302-5/+17
| | | | | | | | | | | | | | | | Made the connection to the qtjsondb server completely transparent for users of the api - i.e. if there is no jsondb daemon running at this time, all requests (create/update/remove/query commands) will be queued in JsonDbClient and sent to the server when that becomes available. At the same time, JsonDbClient tries to connect to the server every 5 seconds if the connection was dropped for any reason (e.g. imaging qtjsondb crashes and is restarting itself - with this patch that will be transparent to users and requests will be reset after qtjsondb is back online) Change-Id: If3683c5c1fbac672c481ac3aeecf8e7a251c9211 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix instrumentation with testcocoon.Caroline Chao2011-11-181-0/+1
| | | | | | | | | | | | Add missing --cs-include-path required by some tests projects. Use a common qtjsondb.pri file to propagate the change when required. Change-Id: I8ba0effd0dc5204eafdfd27298fe52751065a001 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* Fixed linking of jsondb-clientDenis Dzyubenko2011-11-041-1/+1
| | | | | | | | | We do not really need to link to curses library. Change-Id: If2c62a21b13379c6f670f32fdd299f21e7b2b13c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com> Sanity-Review: Zeno Albisser <zeno.albisser@nokia.com>
* Fixed build for tools/aodbreadDenis Dzyubenko2011-10-312-10/+14
| | | | | | Change-Id: Ie1c438c122b04f043ef2bbaa7c7e4a6b1a5e1ddc Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* Update licenseheader text in source and header filesSergio Ahumada2011-10-313-3/+3
| | | | | | Change-Id: Ibe017ffabb3f9a9da6f61dfccb3264508c5a2835 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>