summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Replaced Nokia copyrightsHEADmasterTeemu Kaukoranta2013-07-1118-54/+36
| | | | | | | | | | | | | | | | | | Replaced Nokia copyrights with Digia copyrights Replaced Nokia contact details This command also ignores INdT Copyrights and removes trailing whitespace from removed "all rights reserved" lines. find . -path '*/3rdparty/*' -prune -o -exec grep -ilI -E '.*Copyright.*Nokia.*' {} \; | tee >(xargs sed -i -r '1,10 { /INdT/ !{ s/([ \t#*]*)(.*Copyright.*Nokia.*)/ \1Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I } }') >(xargs sed -i -r '1,10 s/(^[ \t]*)([#*]*)([ \t]*) (all rights reserved.*)/\1\2/I') Change-Id: I9792a44e7b27250306bd71c28403721c1676ee4c Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed licensesTeemu Kaukoranta2013-05-2318-368/+386
| | | | | | | | | Updated licenses using replace-licenses.zsh from mkdist repo. Possible copyright and contact changes will come later. Change-Id: Id0687ccef38f51c93dc16eb46599a6e60d5b4eef Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* One (hopefully) last commit to this repo: Mirror what's in qtbase now.Lars Knoll2012-01-2516-557/+654
| | | | | | | | | | This basically updates this repo to mirror the final API that made it into QtBase now. Mainly useful to use the codebase with an older version of QtBase. Change-Id: I8a4bc689b15851323305e45f11ac215dd271873b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* More documentation fixes.Lars Knoll2012-01-182-135/+132
| | | | | | Change-Id: I65f4bb405bbfd846a61e5e79da85fa9a35e59678 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Store the (key, value) pairs in objects sortedLars Knoll2012-01-179-61/+263
| | | | | | | | | | | | | | | Store the (key, value) pairs in objects in Unicode sort order. This way a key lookup is O(logn) instead of O(n). Make sure the parser stores the parsed results in this order as well. Also make the parser work with duplicate keys (the last entry will be taken, the other ones discarded). Change-Id: Iace9cf5a270620fc9d44e75ee5ed9a77326ab735 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Smaller documentation fixesLars Knoll2012-01-172-12/+12
| | | | | | Change-Id: Iadbd09c7daad6707c95dd6efaf5d3b4978a278a3 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Remove inline tag from methods that aren't inlineLars Knoll2012-01-171-2/+2
| | | | | | Change-Id: Ia414b7147b2324680d7c4427eb9de18a6ea415ec Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Further cleanups of the qjsonvalue.h headerLars Knoll2012-01-172-15/+13
| | | | | | Change-Id: If748dabaa54c453e9c74117ab670d3280c18bf96 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove a ### comment.Lars Knoll2012-01-171-1/+1
| | | | | | | | The slightly less strict parsing is indended. Change-Id: Ic2b1654f99b3b7a79ef9dce8463eeba6b1be7d36 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Move private methods into the private namespaceLars Knoll2012-01-176-99/+101
| | | | | | | | | There's no reason these methods need to appear in the exported API. Change-Id: I522aaad53c0473a739634e4bb1eabd9bf75d0b80 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Fix a bug in the test caseLars Knoll2012-01-171-2/+2
| | | | | | | | | Update the test case to reflect the API change from number to double. Change-Id: I43055885de0b461d93674087f09beda85eefb342 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
* Rename QJsonValue::Number to DoubleLars Knoll2012-01-168-126/+94
| | | | | | | | | | | This leaves room for future integer optimisations. It also is more consistent with Qt naming. Remove the QJsonValue::toInt() method at the same time. Change-Id: Iadac7cdfb94808597b7936596f64f45647bdec14 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* fix compilation after documentation update.Jamey Hicks2012-01-162-7/+7
| | | | | | | Change-Id: I0ba7b77803f338e6c1a1e861cce35ceea4f5dea8 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Documentation for QJsonValueLars Knoll2012-01-161-0/+199
| | | | | | Change-Id: Ifc4fce1fe5ffb850962b03a7143a4c7b474aa086 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Add docs for QJsonArrayLars Knoll2012-01-161-1/+684
| | | | | | Change-Id: I72f8fb7e647e5c7bf3b045268ab104dbb2569ffe Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Add documentation for QJsonObjectLars Knoll2012-01-161-0/+616
| | | | | | Change-Id: Ia5a129749b3eb831e84d217cb42607003e5ef841 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Documentation for QJsonDocumentLars Knoll2012-01-162-4/+184
| | | | | | Change-Id: I09f833db189b0c85ca4fa03616fea05e241f00ec Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Overview documentationLars Knoll2012-01-161-0/+118
| | | | | | Change-Id: I79ce4f315a282dc6cb4cfd866a58aff69a680829 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix a corruption in the binary dataLars Knoll2012-01-135-53/+39
| | | | | | | | | | | | When replacing an existing Value in an object or array, we wrote that Value to the place where the old value lived. This caused the data to get corrupted in case the new value was larger than the old one. Change-Id: I0358c30124ae28c16a34a554fc7b24f279850428 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Test case for segfault in compactionJamey Hicks2012-01-131-0/+49
| | | | | | Change-Id: Ib7dc5706334c4dc88ba8602a73ee499e0fb6ab46 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add another test caseLars Knoll2012-01-131-0/+30
| | | | | | | | | | This test that we correctly convert sub objects and arrays to documents. Change-Id: I859a1d9b27554da920b1f53b3e83e1e21110c2c7 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fix the debug operators for aaray and objectLars Knoll2012-01-132-4/+4
| | | | | | | | | | | The streaming operators for qDebug where always writing out the top level object, not the sub object. Change-Id: I70b70a700c1996bc3cbf26c4dc66dad4426fe3e9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Add fromRawData and rawData methodsLars Knoll2012-01-133-4/+26
| | | | | | | | | | | | FromRawData will operate on an existing chunk of binary data without taking ownership. rawData gives direct access to the binary data used inside the document. Change-Id: Ie8c704571ce5a0d68883f0aac8de664397006a94 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fixed object validation in a boundary caseDenis Dzyubenko2012-01-113-3/+32
| | | | | | | | | | | | | | When a latin1 string stored that has only 2 characters or less, the size of the data is 2+2 (2 bytes for the string length and 2 bytes for the content), so it is quite possible that the table is located right after the data. It should be safe to check offset+sizeof(uit) > tableOffset even for shorter strings because values and table is always aligned, hence even for an empty string, it will take 4 bytes. Change-Id: I859ae0be46ebab38feeaa6aa22fbc31f2f95d443 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the QT_STRICT_ITERATOR definesLars Knoll2012-01-112-17/+1
| | | | | | | | | | | | They aren't needed here, as we don't give direct access to the data in the object or array. QJsonValueRef will call setters on the object or array causing the detach to happen at modification time. Change-Id: I3bbd6068f14ad641c238a2f1ca694c86e360e56f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added iterator interface to QJsonArrayLars Knoll2012-01-112-2/+181
| | | | | | | | | Added both iterator and const_iterator and the required typedefs and methods for STL compatibility. Change-Id: Ib33a9c36c3f56a7da453bdc184f5166246a53bec Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added an iterator interface to QJsonObjectLars Knoll2012-01-113-9/+248
| | | | | | | | | Added both iterator and const_iterator and the required typedefs and methods for STL compatibility. Change-Id: Icee9a4bea45ce5499882bc83b8b62c3431b8c976 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Add non const QJsonArray/Object::operator[]Lars Knoll2012-01-118-18/+157
| | | | | | | | | Added a QJsonValueRef helper class to implement this with the correct semantics. Change-Id: Ifa5d4ce15b36c4bd054272c4acb9e13a646a98fd Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added debug stream operatorsDenis Dzyubenko2012-01-0911-30/+243
| | | | | | Change-Id: Icaf45e37e41a54558a9c14cbb03e4fd201aad37f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Implement QJsonArray::replace(int, QJsonValue)Lars Knoll2012-01-093-2/+33
| | | | | | Change-Id: If5c49e063223ac82800d041e72438ff884d7942e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Make QJsonObject/Array::detach() privateLars Knoll2012-01-093-12/+5
| | | | | | Change-Id: I58c1f5ad60f78423b819fc118a5ec2590a2ece88 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Fixed the remaining API issues in QJsonValueLars Knoll2012-01-093-51/+6
| | | | | | | | | Removed all setFoo() methods and made detach() private. Change-Id: Ie84dc0a46bf19153745b5412feaf00b8957a7a8f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Changes after API review round.Lars Knoll2012-01-0913-91/+144
| | | | | | | | | | | | | | | | | | | | * Added: QJsonArray/Object::count() QJsonArray::prepend() * Renamed: QJsonDocument::Tag to BinaryFormatTag QJsonObject::numKeys() to size() QJsonValue::Boolean to Bool * Replaced QJsonDocument::type() with isArray() and isObject() * Made some constructors explicit. * Removed QJsonObject::toJson() * Added isType() methods to QJsonValue * added some ### for further changes Change-Id: Id88f24f2921b53d6781def3f808e146c9f61cb31 Sanity-Review: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* rename enum QJsonValue::ValueType to QJsonValue::TypeLars Knoll2012-01-096-11/+11
| | | | | | Change-Id: I8f83bd3d4b64b238d937b8730ff78836ff962dd2 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Move the QBJS tag into QJsonDocumentLars Knoll2012-01-096-8/+9
| | | | | | Change-Id: Idc8f6c31d7b54dd53cb8a4b04b043815bddd3913 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Class names should start with a QLars Knoll2012-01-0916-514/+514
| | | | | | | | Now all class names are prefixed with QJson. Change-Id: If6d1ebcdcec983dbf7a0cd6356f68afc117dbbc7 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Naming cleanupsLars Knoll2012-01-0916-305/+318
| | | | | | | | | Move private classes into Private namespace Move ValueType into QJsonValue class Change-Id: I122f2084037ed9dc6e508082af9280e39ed2f925 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fix a bug in QJsonDocument::operator==()Lars Knoll2012-01-093-1/+21
| | | | | | | | | | | | Also add a test case loading binary data and comparing it to something created from text based json. Change-Id: Ib8ee7a415365498323e57d60cb469695ea34fdaa Sanity-Review: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Make the json parser endian safe.Lars Knoll2012-01-091-8/+15
| | | | | | Change-Id: I7dfb3986103d17911d6fc2d40fc2bc1eb6ff8b85 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Ensure the header is always little endianLars Knoll2012-01-093-4/+4
| | | | | | | Change-Id: Iacc90feb38e99a02d46f8184ac80deca5009210e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Store double as little endianLars Knoll2012-01-093-4/+6
| | | | | | | | Change-Id: I0eaa94c61124f710d4b9db26cbe08b483b64700b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fixed broken binary output after compactionDenis Dzyubenko2012-01-062-0/+22
| | | | | | | | The tag was not present in the header after compaction was triggered Change-Id: I329519698961e615a378b51711fbb4d7978af665 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Reuse the table entry when inserting an existing keyLars Knoll2012-01-063-17/+7
| | | | | | | | | | | This saves us some time and reallocations. Ideally, we'd also reuse the entry where possible, but this helps already. Change-Id: I4140599483309cf0c1fa90e220cb3c890e7184a3 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* When insering an existing key, remove old value.Denis Dzyubenko2012-01-062-1/+13
| | | | | | | | | Duplicate keys in json are not allowed, so whenever an already existing key is inserted into JsonObject, remove the old item first. Change-Id: I1f0790d5e76553fc26d747ef42212c1d3649d67b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Marked unit tests as testcasesDenis Dzyubenko2012-01-062-0/+6
| | | | | | | | Also, don't make a bundle on Mac. Change-Id: I09afaa215355a83aca96b1abcc62c27305552b54 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Removed wrong rpath from the testsDenis Dzyubenko2012-01-062-4/+0
| | | | | | Change-Id: Ib46c41577d583cf60ece45e7b6dc5a52b97f791e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make the data structure endian-safeLars Knoll2012-01-057-53/+177
| | | | | | | | | | The binary data structure is always little-endian. Use some special types to ensure that we store things correctly even on a big endian machine. Change-Id: Ief814d14f163344eae4860b6324b69b005ce8ae7 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Move QBJS_Tag to externally-visible locationAndrew Christian2012-01-052-2/+1
| | | | | | | | | | Programs that auto-detect file or stream formats can use the first four bytes of the qjsondocument by matching QBJS_Tag. This patch exposes the tag so that programs don't have to hardcode the 4 bytes in their code. Change-Id: I661895dd301c6d9dfae6850263c7f5b3461d3366 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* use QT += json in tests/auto and tests/benchmarksJamey Hicks2012-01-042-6/+2
| | | | | | Change-Id: I93006df39254cb6fde57f1b6dbac342292ee2863 Reviewed-by: Andrew Christian <andrew.christian@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Simplify the String/Latin1String classesLars Knoll2012-01-041-105/+64
| | | | | | | | | String and Latin1String are now laid out as the binary data, so we can directly cast memory to these classes. Change-Id: Ief229f8d79241f68bb167bde7a4fab6fdfd152a9 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>