summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qcborarray.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-091-9/+17
|\ | | | | | | Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
| * Change QCborArray to pad with invalid on inserting past endEdward Welbourne2018-10-081-9/+17
| | | | | | | | | | | | | | | | | | Likewise have mutating operator[] insert an invalid entry at its target index, if beyond the end of the array. This makes it possible to fill an array from high index to low, for example. Change-Id: If71699c20e2623142214ce2c11c4d6e4a120c989 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Implement QDataStream operator for main CBOR classesJędrzej Nowacki2018-10-031-0/+20
|/ | | | | | Change-Id: Ib3b68b1963625432c68d02be3bf2ec3c4baf1104 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CBOR: Add missing clear() methods to the two container classesThiago Macieira2018-09-091-1/+11
| | | | | | Change-Id: Id59bdd8f1a804b809e22fffd153fd5174b58014d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* JSON: Add qHash functions for JSON and CBOR typesUlf Hermann2018-08-271-0/+5
| | | | | | | This way we can easily use them as keys in QHash and QSet. Change-Id: Ie744c3b5ad1176ba2ab035c7e650af483757a0c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdoc: Fix remaining qdoc warnings for QCborxxx classesMartin Smith2018-08-171-2/+7
| | | | | | | | | | Several \fn commands are added for functions and operators that were not documented. A few qdoc warnings remain in qcborstream.cpp, but these are because an enum class was used, and qdoc doesn't yet handle those correctly all the time. Change-Id: I02a740c595e36c1b383af242c2a6419d1f37b135 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdoc: Fix \fn commands for QCborxxx member functionsMartin Smith2018-08-071-4/+5
| | | | | | | | | | Severa qdoc function comments had incorrect signatures. This update corrects them to match the declarations in the header file. A \keyword command was also added for linking to the generic algorithms header file page. Change-Id: I997f7f2c7e4d0c3fcd269ee2c89a2836fecd4927 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCborArray: add const_iterator overloads for insert/erase/extractThiago Macieira2018-07-141-0/+5
| | | | | | | | | They return regular iterators, since the container has been modified. Change-Id: Id59bdd8f1a804b809e22fffd153f92d4460f9b76 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CBOR: Use "noexcept" directlyThiago Macieira2018-07-141-4/+4
| | | | | | | | | | | All supported compilers support it. Doing this just for the new API. We should do it throughout Qt, but only if it won't interfere with the header review. Change-Id: Id59bdd8f1a804b809e22fffd153f9254688e5152 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QCborArray & Map: implement move semanticsThiago Macieira2018-07-051-0/+15
| | | | | | | | | | | There isn't a lot of efficiency gain, since QCborValue was already refcounted. This saves two atomic operations and an out-of-line call. In the case of QCborValueRef (which includes QCborMap), because we reset the container pointer in inline code, the call to QCborValue::dispose() is also suppressed. Change-Id: Icc2c231dc2c44abdb087fffd1533eaba7a9c70fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QCborArray & Map: implement efficient take() / extract()Thiago Macieira2018-07-041-1/+18
| | | | | | | | | | | | Questions: 1) should QCborMap::extract return value_type (a pair) instead of just the value? 2) should the both return the iterator to the next element too, like erase()? Change-Id: I052407b777ec43f78378fffd15302a9c14468db3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CBOR: Add QDebug operators for the Qt CBOR value-like typesThiago Macieira2018-07-041-0/+14
| | | | | | | | | | I added a function that returns the string identifiers for QCborKnownTags and QCborSimpleType, in order to facilitate writing a QTest::toString for those types, as neither enum is part of a Q_OBJECT or Q_GADGET class. Change-Id: I56b444f9d6274221a3b7fffd150d2d26a1925c19 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Long live DOM API for CBOR!Thiago Macieira2018-06-081-0/+1141
This is very similar to QJsonDocument, but there's no QCborDocument. QCborValue is that. [ChangeLog][QtCore] Added QCborValue, QCborArray and QCborMap, classes that permit DOM-like access to CBOR data. The API is similar to QJsonValue, QJsonArray and QJsonObject, respectively. Change-Id: I9741f017961b410c910dfffd14ffca50dd8ef3ba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>