summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-151-4/+8
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qfloat16.cpp src/corelib/global/qfloat16.h src/plugins/platforms/windows/qwindowswindow.cpp Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
| * Add 'well-formated' JSON string valuesMichal Klocek2019-05-141-4/+8
| | | | | | | | | | | | | | | | | | | | Add support for surrogate code points U+D800 through U+DFFF, represent them with JSON escape sequences. https://github.com/tc39/proposal-well-formed-stringify Change-Id: I84fea53a8ef400beebefdba10ea82dc510fe7dda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDataStream: move QLinkedlist operators to qlinkedlist.hMarc Mutz2019-05-141-13/+0
| | | | | | | | | | | | | | This is in preparation of deprecating QLinkedList. Change-Id: I7540b784736a48cf4857d1969440d35ec64457e2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-131-2/+1
|\| | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| * Doc: replace even more null/0/nullptr with \nullptr macroChristian Ehrlicher2019-05-081-2/+1
| | | | | | | | | | | | | | | | Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Remove handling of missing Q_COMPILER_INITIALIZER_LISTSAllan Sandfeld Jensen2019-05-022-8/+0
| | | | | | | | | | | | Change-Id: Id65b39c787235a051262544932e6717d076f1ea0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Prepare QDataStream for Qt 6.0Lars Knoll2019-05-021-1/+9
| | | | | | | | | | | | | | | | Add the required datastream versions for 6.0. Of course the number for 5.15 and 6.0 is still something we can bump. Change-Id: I676385817befc06ea8d0ff1e9eba9c94cb4698b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Compile when bumping the Qt version to 6.0Lars Knoll2019-05-022-3/+13
| | | | | | | | | | Change-Id: Idae1a2df144598df3921ef9a12e0e0b740fd723d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Prefix textstream operators with Qt::Lars Knoll2019-05-023-4/+4
| | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-291-0/+1
|\| | | | | | | Change-Id: Ic712e8a84b01b212bb1121d7a2c9b85e0d2da9da
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-281-0/+1
| |\ | | | | | | | | | Change-Id: Ibce9bfef928ce39070183c488ce86ae32e5ea705
| | * qdoc: Fix warnings about missing \inmodule commandKai Koehne2019-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings qtbase/src/corelib/io/qprocess.cpp:776: (qdoc) warning: Class CreateProcessArguments has no \inmodule command; using project name by default: QtCore qtbase/src/corelib/serialization/qcborstream.cpp:1441: (qdoc) warning: Class StringResult has no \inmodule command; using project name by default: QtCore Change-Id: I1c85ca32aff1f89f70898af7b11cfead96c80349 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Implement std::numeric_limits<qfloat16>Edward Welbourne2019-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shall make it more nearly a first-class numeric type; in particular, I need some of these for testlib's comparing and formatting of float16 to handle NaNs and infinities sensibly. Change-Id: Ic894dd0eb3e05653cd7645ab496463e7a884dff8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-111-0/+10
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-101-0/+10
| |\| | | | | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| | * Update TinyCBOR with bugfixesThiago Macieira2019-04-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated to https://github.com/thiagomacieira/tinycbor commit ac9369d8ec8511bc7516266ae6b07f7da860c954. Fabrice Fontaine (1): fix undefined encode_half in json2cbor Pedro Oliveira (1): Fixed minor error in the example code. Svyatoslav Phirsov (2): Typo fixed in stdlib fread(...) usage typo in dumprecursive return type Thiago Macieira (9): Install the tinycbor-version.h header. Update version number for a possible but unlikely 0.5.3 release Fix #137: off-by-one error in UTF-8 decoding Update Travis CI to Ubuntu Xenial Pretty: fix use of uninitialised variable Validation: fix out-of-bounds access when content ends in a string Parser: apply the same memory-check update Tests: remove useless comment Tests: Catch an earlier QCOMPARE failure in compare() phirsov (6): Fix off-by-one causing buffer overflow in open_memstream Protect macro argument expansion using parentheses eliminating misleading messages in case .config file not yet created Run check silently in Travis Make AppVeyor test suit run silent as in Travis enhancement #149 implemented: access half-precision floating point data as single float Change-Id: I9e3d261ad9bf41cfb2b6fffd159088f1cc9b3b02 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-04-081-6/+0
| | | | | | | | | | | | | | | Change-Id: I7bc6c455fbae4cdad584c76773299a6d8cd40c82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add serializer/deserializer for EnumerationPaolo Dastoli2019-04-052-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enum class are serialized using the declared size. [ChangeLog][QtCore][QDataStream] Enumerations can now be serialized through QDataStream without the need of manually defining streaming operators. Change-Id: Iae9a63eb62b5a5615b657766a3c4c66ba4d98d0e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Paolo Dastoli <paolo.dastoli@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-037-32/+32
| | | | | | | | | | | | | | | | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Clean up QTextStream functionsAllan Sandfeld Jensen2019-03-232-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | They are the only Qt symbols neither prefixed with q or with the Qt namespace. This changes preserves source and binary compatibility while making it possible to define conflicting symbols. Change-Id: I6d4181206e63faa922fa0c8b644e0a4b88826a97 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-161-5/+22
|\| | | | | | | | | | | Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-151-5/+22
| |\| | | | | | | | | | Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
| | * Doc: "UTF" -> "UTF-8"Thiago Macieira2019-03-141-1/+1
| | | | | | | | | | | | | | | Change-Id: Ifbadc62ac2d04a9a8952fffd158a5a9ba87c30e0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Add a pair of functions to convert to and from Q/CborErrorThiago Macieira2019-03-141-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've so far made our public API match the TinyCBOR error codes, so the conversion is trivial. Having the two functions allows us to change that, if it becomes necessary. It also effectively concentrates the Coverity warning about mixed enums in a single pair of functions. >>> CID 190307: Incorrect expression (MIXED_ENUMS) >>> Mixing enum types "CborError" and "QCborError::Code" for "err". Change-Id: Ifbadc62ac2d04a9a8952fffd1589e739c7a5b745 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Liang Qi2019-03-151-1/+1
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-141-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qcollator_win.cpp Change-Id: I6d806d7c58b2057ebde3ad915bb5551f34b700e5
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-111-1/+1
| | |\| | | | | | | | | | | | | Change-Id: Iecdf00ca61d819bde532daa42f093860ec4a499e
| | | * Fix Coverity warning about mixing enumsThiago Macieira2019-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity says: >>> CID 190310: Incorrect expression (MIXED_ENUMS) >>> Mixing enum types "CborType" and "QCborStreamReader::Type" for "type_". Change-Id: Ifbadc62ac2d04a9a8952fffd1589e6e304fc7703 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | More nullptr usage in headersKevin Funk2019-03-142-7/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / / Bump versionKari Oikarinen2019-02-252-2/+4
|/ / | | | | | | Change-Id: I5561df4b90b02d88bb2fc7b52d74487e71efce7d
* | QtCore: replace null and nullptr with \nullptr in documentationChristian Ehrlicher2019-02-181-2/+2
| | | | | | | | | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: Ib9e0cfc2eb2830b213e6523773603d56180b0998 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-083-1/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| * qtlite: Fix build libs with -no-feature-regularexpressionMikhail Svetkin2019-01-273-1/+28
| | | | | | | | | | Change-Id: I427ff1f8f4986fbf466aba60a9d3de614c1e006f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QtCore: replace 0 with \nullptr in documentationChristian Ehrlicher2019-01-283-9/+9
| | | | | | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: I101a61f5fad71cadb73bba9a8fd5dce6cc0836d0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Add QJsonArray::cbegin()/cend() methodsLars Knoll2019-01-252-0/+18
| | | | | | | | | | | | | | | | Add those to be consistent with the rest of Qt and the STL. Fixes: QTBUG-32793 Change-Id: Ib712b7b16b8be6627aeac79b90c6e9cdf92b60e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update qxmlstream.g with changes from qxmlstream_p.hLars Knoll2019-01-251-3/+11
| | | | | | | | | | | | | | | | | | | | | | Some updates that made it into qxmlstream_p.h have not been reflected in qxmlstream.g. Also fix the expected amount of shift/reduce conflicts. Fixes: QTBUG-60186 Change-Id: I2a5e1c579dbbe8812a75ca6bb1e3a6a0ba909cdf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: mark obsolete functions as deprecatedChristian Ehrlicher2019-01-232-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the following obsolete functions as deprecated so they can be removed with Qt6: - QDataStream::unsetDevice() - QDir &QDir::operator=(const QString &path) - QDir::addResourceSearchPath() - QResource::addSearchPath() - QResource::searchPaths() - QSettings::setSystemIniPath() - QSettings::setUserIniPath() Change-Id: I5edfb2b4ce1ad843fa5fcd5b4c475ab9352b05f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-121-1/+1
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]Sergio Martins2018-12-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>) corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue) gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant) tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name) Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-222-4/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdir.cpp src/corelib/kernel/qtimer.cpp src/corelib/kernel/qtimer.h Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Liang Qi2018-11-162-4/+6
| |\ | | | | | | | | | Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
| | * Doc: QCbor classes: Fix \variable commandsTopi Reinio2018-11-062-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | \variable must not include the variable type, QDoc will resolve that. This commit resolves four documentation warnings. Task-number: QTBUG-71502 Change-Id: I5e88cf66d3c3bb8f18495d5477e1271ac2cd9e74 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-1010-48/+62
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborcommon.h src/corelib/tools/qlocale_data_p.h tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-097-41/+43
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| | * | Modernize the "textcodec" featureLiang Qi2018-11-077-41/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | | Correct which codecs QTextStream::autoDetectUnicode detectsThiago Macieira2018-11-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-67187 Change-Id: If7e743cf8476463880ccfffd155f86b78a279f81 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | Fix warning about missing initializer for a struct memberThiago Macieira2018-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.8 is complaining about perfectly valid (and recommended) code but we still support it, so... qcborvalue.h:74:25: warning: missing initializer for member ‘QCborError::c’ Fixes: QTBUG-71222 Change-Id: If7e743cf8476463880ccfffd155e8775b6b95469 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | QCborStreamReader: make sure setDevice() clears the last errorThiago Macieira2018-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit tests weren't running into this problem because the every setDevice() was preceded by the object being initialized with the exact same data, so there was never a previous error state. I've only changed a couple of tests, left the other setDevice() unchanged so we test both behaviors. Fixes: QTBUG-71426 Change-Id: I1bd327aeaf73421a8ec5fffd1561a590e3933376 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | Add qHash(QCborTag) and qHash(QCborSimpleType)Thiago Macieira2018-11-081-0/+10
| | |/ | |/| | | | | | | | | | | | | | | | | | | Needed in qHash(QCborValue). Change-Id: If7e743cf8476463880ccfffd155eeca91369b356 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Handle fonts that have commas/quotes in the family nameAndy Shaw2018-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the comma character was originally used as a separator, we need to extend QFont to have setFamilies() so that we can avoid joining the family strings together. This enables us to see the family name as a single string and for multiple family names, we have families(). Subsequently, this has added functions to QTextCharFormat to account for multiple font families too. So it is now possible to set a single one directly with setFontFamily() and multiple ones with setFontFamilies(). This also bumps up the datastream version to 19 as QFont now streams the families list as well. [ChangeLog][QtGui][QFont] Add setFamilies()/families() to aid using of font families with commas and quotes in their name. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 19 to account for changes in the serialization of QFont. Fixes: QTBUG-46322 Change-Id: Iee9f715e47544a7a705c7f36401aba216a7d42b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>