summaryrefslogtreecommitdiffstats
path: root/examples/corelib/serialization
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-247-87/+15
|\ | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Deprecate QJsonDocument methods for converting to/from JSON binarySona Kurazyan2020-01-094-82/+10
| | | | | | | | | | | | | | | | | | Also remove the example code for deprecated methods and use CBOR instead where it makes sense. Task-number: QTBUG-81068 Change-Id: Iffb7a4b3d7b16a1e485fc05b3ab2e2468e9e0718 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-153-5/+5
| | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-143-3/+3
|\| | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
* | Fix compiling of examples on AndroidSimon Hausmann2019-06-123-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Allow to build examples as standalone projectKevin Funk2019-06-053-55/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create CMake config files which can be used from the very same CMake project. These CMake config files simply do not create any targets, controlled via the QT_NO_CREATE_TARGETS. This patch also allows to build qtbase.git:examples as a standalone project, against an already-built Qt. Ran this: ag -s "QT " examples -l -0 | xargs -0 -n 1 .../util/cmake/pro2cmake.py --is-example Task-number: QTBUG-74713 Change-Id: I44cce5a4048618b30f890c5b789592c227a8b47d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-032-4/+4
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Prefix textstream operators with Qt::Lars Knoll2019-05-022-4/+4
| | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-167-12/+8
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-3/+3
| |\ | | | | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| | * Examples: properly parse more than one element in maps and listsThiago Macieira2019-03-221-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I46363e5b8944459e8c48fffd158c03bca4b7394e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-193-6/+3
| |\| | | | | | | | | | Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
| | * Add cmdline feature to qmakeJoerg Bornemann2019-02-183-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | Cleanup QtCore examplesChristian Ehrlicher2019-02-063-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup QtCore examples: - use new signal/slot syntax - use 0 instead nullptr - remove unneeded includes - use initializer lists - replace foreach with range-based-for loop Change-Id: I5581f485fa0e9ccf3f4ce6f643908832bc6959bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Examples: cleanup foreach usageChristian Ehrlicher2019-02-022-2/+2
| | | | | | | | | | | | | | | | | | | | | Replace deprecated foreach macro with range-based for loop Change-Id: If919ba1d1d4acddfc1c5460ce7aebf8c49e3ac38 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | CMake: Add more examplesTobias Hunger2019-03-264-0/+72
|/ / | | | | | | | | Change-Id: I7a8a3fd0a844a518592957fe07c6e707dd452d5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* / Implement QDataStream operator for QCborSimpleValueJędrzej Nowacki2018-10-031-13/+0
|/ | | | | | | That allows us to remove custom handling in QMetaType. Change-Id: Ic09fb96e1a05c6897803811d70aebbc6ea6e4f2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* cbordump: Fix build with linux-clang-libc++Jüri Valdmann2018-07-121-0/+1
| | | | | | | | | ../cbordump/main.cpp:716:15: error: use of undeclared identifier 'LC_ALL' setlocale(LC_ALL, "C"); ^ Change-Id: Ibff2345ffa99894cdcd48323f8c365d01ebd6300 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Metatype: make the Qt CBOR value-like types built-in meta typesThiago Macieira2018-07-041-3/+0
| | | | | | | | This change only adds them to the registry and reserves the IDs. The next commit will handle conversions. Change-Id: I56b444f9d6274221a3b7fffd150d2d49f40940c2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CBOR: Add QDebug operators for the Qt CBOR value-like typesThiago Macieira2018-07-041-10/+0
| | | | | | | | | | 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>
* Examples: add an example that converts between different file formatsThiago Macieira2018-07-0416-0/+2494
| | | | | | | | | | | | | | | | This example converts to and from: - Binary JSON - CBOR - CBOR Diagnostic notation (output only) - JSON - Null (output only) - QDataStream - QVariant dump (output only) - Text - XML Change-Id: Ibab69e0efefb40bdbf94fffd150b59f8c0da3174 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Example: add a simple CBOR dumper toolThiago Macieira2018-05-284-1/+806
| | | | | | | | This is useful as well when trying to figure out what a CBOR file contains or how it may fail to parse. Change-Id: Ic38ec929fc3f4bb795dafffd150ad7c0bd8e9887 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix some qdoc-warnings for 5.11Friedemann Kleint2018-02-211-15/+15
| | | | | | | | | | | | | | | | Rename example savegame and its snippets following a6b697ca13945a174cff9f3e9b1af1cf61c0bea5. Fix: /qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:28: warning: Cannot find file 'json/savegame/savegame.pro' or 'json/savegame/savegame.qmlproject' qtbase/examples/corelib/serialization/savegame/doc/src/savegame.qdoc:98: (qdoc) warning: Cannot find file to quote from: 'json/savegame/level.cpp' json qtbase/src/network/ssl/qsslconfiguration.cpp:889: warning: Undocumented parameter 'name' in QSslConfiguration::setBackendConfigOption() qtbase/src/corelib/tools/qbitarray.cpp:314: warning: No such parameter 'len' in QBitArray::fromBits() Change-Id: If59512873ca2116b89490927fdbf9ea1d8b237a8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-2610-0/+1005
This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>