summaryrefslogtreecommitdiffstats
path: root/examples/corelib/serialization
Commit message (Collapse)AuthorAgeFilesLines
...
* XBEL example: minor simplificationsEdward Welbourne2023-06-092-13/+3
| | | | | | | | | | | | | Pass one function's return as a parameter to another directly. Use a ternary expression rather than conditional initialization. Use initializer-list construction instead of appending to an empty QStringList; and inline the result where it's used. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I781aedba8dcc4251193b55d82fe684c9b5da241a Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* XBEL example: Fix null dereference bugEdward Welbourne2023-06-091-1/+1
| | | | | | | | | | As readXBEL() does call readSeparator(nullptr), the latter should cope with being passed nullptr as item. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I786e4438b566438448b5d54ff6442c27f1255aa8 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* XBEL example: use nullptr rather than 0 for null pointersEdward Welbourne2023-06-091-3/+3
| | | | | | | Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I7cb95ab6f84854d36a949d1ce667cb80a9c626be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Do not add the same category twiceEike Ziller2023-05-261-1/+0
| | | | | | | | | Amends 1371cd107a2dab2a29e3e10e9bb823a9ff04a3a9 Task-number: QTCREATORBUG-29197 Change-Id: I0dd4a08a597c237fd09f788cafb79af755953d0d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Document the RSS Listing exampleEdward Welbourne2023-05-255-98/+170
| | | | | | | | | | | | | | Add an image and a QDoc file, remove the (in some cases misleading) doc comments from the CPP sources, group the slots all together in the source so as to document them together, group the two private methods together. Dust the header lightly with comments to classify the class members and enclose relevant parts in QDoc snippet markers. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I0090fb45ce8d5a8f168fde9b3247d541b709c1b2 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* rsslisting example: use initializer list to construct string listEdward Welbourne2023-05-251-3/+1
| | | | | | | | | | It's cleaner than declaring, using << to populate, then using once. Just construct it and use it where it's needed. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: Id10483b26937a97899d656c4b26f27b37b8d39b6 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
* rsslisting example: rename a slot to reflect what it doesEdward Welbourne2023-05-252-3/+3
| | | | | | | | | | | | | Many slots can be connected to one signal so, unlike a virtual method that must be named for the situation in which it is called, a slot can (so should) be named for what it does, rather than naming it to match the signal it's connected to. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: If2fa40cac0e51a243054526d7d2997fdd54aea3e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* RSSListing: remove metaDataChanged slot to handle redirectsEdward Welbourne2023-05-252-10/+0
| | | | | | | | | | | QNetworkAccessManager takes care of doing that by default anyway, these days. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I890d258599e22efb6fc6ce0140304a97edcbb3f8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
* Turn itemActivated() slot of RSS listing example into a lambdaEdward Welbourne2023-05-252-10/+2
| | | | | | | | | | | | It needs nothing but the parameter it is passed and has no material interaction with the rest of the RSSListing class, so there's no point devoting a slot to it, much less a public one. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I46d572982197550801c6fa4425453fc670c6f2f1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: fix links to examplesVolker Hilsheimer2023-05-241-2/+2
| | | | | | | | | Remove the xml prefix, only reference the example by title. The streambookmarks example is gone, so remove that link. Change-Id: Ie3a77be24f60fca9e8f9ef0323f0ea5ffc904075 Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* RSS listing example: prefer setDevice() over addData(readAll())Edward Welbourne2023-05-161-13/+9
| | | | | | | | | | | | | | | The network reply is a QIODevice, so the QXmlStreamReader can be set to read from it directly, which it might potentially do incrementally, rather than by reading all the data in one go. In the process, change the set-up of the reply to first check that it got a valid URL, then check it got a reply, before doing things with that reply. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I3642e24e0d10721e4a0325b35a94dcb5dfbcd4e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Shrink the CBOR dumper example's imageEdward Welbourne2023-05-151-0/+0
| | | | | | | Apply optipng -o7 -zm9 -strip all to the image to make it more compact. Change-Id: Iebfc1f767759b5beac47bd7efa61d1c655163f03 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* rsslisting example: fix bug in construction of title stringEdward Welbourne2023-05-151-4/+3
| | | | | | | | | | | | | | | | | | The correct time to clear titleString and linkString is at the start of the item element, to avoid not only the left-overs from a previous item but also any stray titles and links that don't belong to any item. The channel element, that contains the items, may also have title and link elements. This, indeed, lead to the first entry in the displayed table having a "Qt Blog" prefix on its blog-post's title. Fortunately the link was already being set, usually to empty, due to the lack of rss:about attributes on item elements. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I16647e2498b58caaafa6e88ef73f0d934a1f8396 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* rsslisting example: shuffle parts of constructor for clarityEdward Welbourne2023-05-151-8/+4
| | | | | | | | | | Group related things together, improve the logical flow of the code. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: If3eb577b74128b305ca5fb3074168280ec2d4db8 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* rsslisting example: move default URL to main()Edward Welbourne2023-05-153-4/+5
| | | | | | | | | | | | | It felt more natural that the RSSListing class would be agnostic about the default URL, so let it be a constructor parameter. In the process, update the URL to what the old one now redirects to (thanks to Ivan Solovev for spotting that) and make the constructor explcit (thaks to Ievgenii Meshcheriakov for suggesting this). Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I9f4c0d126e0872bb4ec6e6bb41add7e9d2a9537f Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* rsslisting example: Tidy up #include usageEdward Welbourne2023-05-153-7/+4
| | | | | | | | | | | | | | | | Replace one #include with a forward-declaration - in rsslisting.h QUrl is only passed by reference to a function. Shuffle order of existing forward declarations to be alphabetic, in the process. Shuffle #include order in sources so that this example's own headers appear before the Qt ones. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I69a9e091c77f9d3190c0217c8bd9262e056f66fc Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* rsslisting example (coding style): split a long line, purge stray bracesEdward Welbourne2023-05-151-5/+4
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ic919d4dee74823f11c55d286beba447d45111754 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* rsslisting example (coding style): fix horizontal spacingEdward Welbourne2023-05-152-3/+3
| | | | | | | | | | Remove space after *, insert space after comma. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I7525715dede20b45241efaf3f9540c896b1455c7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* rsslisting example: remove unused include and surplus blank linesEdward Welbourne2023-05-152-7/+0
| | | | | | | | Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ibfa82aef67eaf6ba758dade30a4c9542f2836123 Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* savegame example: clarify that CBOR can be readEdward Welbourne2023-05-151-5/+6
| | | | | | | | | | | | | The documentation talked about using CBOR to keep folk from reading, where (of course) it merely makes it more obscure (and compact). Make clear that this just makes it less easy and mention the tool that makes it easy again. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I472acda4b7533db41ab0e78b694e0256b34d2b40 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add metadata to serialization examplesEdward Welbourne2023-05-153-0/+4
| | | | | | | | | | | | | | There's no separate category for {de,}serialization, so I've put them in Input/Output; and at least some of them are relevant to transmission over the network, so include that as a tag, so that someone writing a network application that wants to use what they illustrate gets a chance of being lead to it. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ie9f6dbaf85aed852e9f64eba05ec8c5fe0a7382d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* rsslisting example: don't leak the RSSListing objectEdward Welbourne2023-05-091-2/+2
| | | | | | | | | | | It was new'd and unparented, so its destructor was never getting called. A stack instance will do just fine. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: If362b0e1e5b50d711a8fe8e01a8830034edf5363 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
* Update cbordump image to a higher-resolution oneEdward Welbourne2023-05-091-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incidentally using reversed video, too, as that's what came naturally to the terminal I was using. File is smaller, but text in the new image is considerably more readable and the image is bigger. The examples guideline calls for an image giving some idea what the example is about, with a 4:3 or 5:4 aspect ratio. An image shorter than its width wasn't practical, and getting a useful amount of information in a height less than 3/2 of the width would have required widening into blank space purely to satisfy the aspect ratio. The prior image's ratio was about 12:7, the new one's is roughly 2:3. The old image showed the start of cbordump -a output, which is rather less illuminating than the default output of formatted data; it's also rather verbose, so was cut off part way through. It does, however, illustrate how the annotated form might be useful for debug purposes. The image also had a lot of blank space to the right of the text of interest, wasting roughly half of its width; it could easily have been cropped to 1:1 without loss of information. As example data-set, it used ../savegame/save.dat, but without any hint to how to generate that. I decided to include a hint to how to generate a CBOR data file to dump, then show the standard output and only the beginnings of the annotated output, as the latter (even on its own) would make the aspect ratio considerably taller. In the context of the standard display, the preamble of the annotated one gives a reasonable feel for what's going on, without belabouring the point. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ic54893c483607e95627a50db76a0d9918744c07e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Add XML, Json, CBOR examples to IO categoryKai Köhne2023-05-094-0/+4
| | | | | | | | Pick-to: 6.5 6.5.1 Task-number: QTBUG-112372 Change-Id: I867bd33ff08629e03b35eccd4b7418573abe7c68 Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* savegame ex.: revamp the way print() worksMarc Mutz2023-05-098-20/+29
| | | | | | | | | | | | | | | Basically, instead of re-creating QTextStreams all the time, create it once, in main(), and then pass it to print() alongside the int indentation. Also fix a hard-coded indentation value that should have been relative to the caller's indentation level. Pick-to: 6.5 6.2 Task-number: QTBUG-108857 Change-Id: I811447295c9c3fdef23f61aff31ebe82941eb3b4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Flip string comparisons in savegame exampleEdward Welbourne2023-05-041-2/+2
| | | | | | | | | | | | | | This follows up to commit 9834e80833783357743b2a5abe3071760638effb, fixing an accidental flip to the meaning of keywords on the command-line. If the first word is "load" we should load a prior game, not start a new one; if the second is "binary" we should use CBOR, the binary format, not JSON. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: If29070777daf68f2f959bc1ec4ffd67ba90b28ba Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* savegame ex.: revamp the way we (de)serialize JSONMarc Mutz2023-05-037-113/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSON, unlike, say, QDataStream, allows building up objects independent of some central object, and combining them into a QJsonDocument later. This suggests returning QJsonObjects from a toJson() const method instead of having the caller supply a QJsonObject. Doing it this way enables transparent move semantics to kick in, too. For deserialization, use a fromJson() named constructor for value-like classes (where identity doesn't matter, only equality). Keep using read(), too, and add a note to explain when to use which form. Also, avoid the triple lookup from if (json.contains("key") && json["key"].isSoughtType()) mFoo = json["key"].toSoughtType(); by using C++17 if-with-initializer and showing the trick with Undefined never being of isSoughtType(): if (const QJsonValue v = json["key"]; v.isSoughtType()) mFoo = v.toSoughtType(); Adjust the discussion to match the new code, up the copyright years and rename some qdoc snippet markers from nondescript [0]/[1] to [toJson]/[fromJson]. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 Change-Id: Icaa14acc7464fef00a59534679d710252e921383 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace runic XSLT with a python script and tidy cbordump codeEdward Welbourne2023-05-023-201/+276
| | | | | | | | | | | | | | | Filters records on having value < 256, or an RFC, previously hacked into the XSLT to produce the last update, with a bit of hand-editing. Using a python script makes it easier to control the formatting and other details; for example, severl entries previously had descriptions that mentioned their RFC, with specific section, to which the XSLT was adding a redundant mention of the RFC. It is also possible to exploit C++ string juxtaposition to get tidily-presented string literals, without having to resort to raw strings. Task-number: QTBUG-111228 Change-Id: Ibd1c93dc1c88689e78b2b13a6bcb59a003f4df0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update table of CBOR tag descriptions in cbordump exampleEdward Welbourne2023-04-192-46/+185
| | | | | | | | | | | | | | | | | | | | A comment said how to do this, so I gave it a try. Added a note to the instructions to save the next person to look at this from, as I initially did, thinking the comment in the generated code had the URL wrong. It turns out that some of the newer additions to the IANA registry have semantics elements that spread across several lines. I don't know the XSLT magic to replace each newline in a value, along with its preceding and following spacs, by a single space, so adapted the XSLT to produce C++ raw strings to wrap these multi-line entries. That'll produce somewhat ugly output, so left a TODO for the better solution. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I7d5e968284e0f1da2ec990af9512c9b7cb886792 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove excess namespaces from XSLTEdward Welbourne2023-04-191-1/+2
| | | | | | | | In the process, break up a long line. Change-Id: Iec50e3bf292da9a3d4aef22bf5c59f2008b35c1f Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* savegame ex.: give some TLC to main()Marc Mutz2023-04-111-8/+11
| | | | | | | | | | | | | | - include what you use - make 'args' const, so we don't detach in op[] - make boolean variables const - use QString::compare(lhs, rhs, Qt::CaseInsensitive) instead of lhs.toLower() == rhs - use new _L1 UDL - fix indentation of a return statement Pick-to: 6.5 Change-Id: If9da4fbe975d9a97939ea01558b2a8cef7ad3a24 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move streambookmarks example into corelibe/serializationØystein Heskestad2023-03-3116-0/+769
| | | | | | | | | | | | The stream-based XML serialization API resides in corelib/serialization. Move the steambookmarks example there. The Qt XML documentation is updated to no longer refer to this example code directly and refer to the direct location in the example documentation instead. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: Id36fb04a6acb7b8d1eb008f61568fe0abc221e3d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Move rsslisting example into corelibe/serializationØystein Heskestad2023-03-217-0/+346
| | | | | | | | | | The implementation of the stream-based XML parser resides in coreslib/serialization. Moving the rsslisting example there. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: I862909e767301250750b6ee0d8ac7e20d6bad2b1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Rework documentation of cbordump exampleEdward Welbourne2023-03-201-23/+24
| | | | | | | | | | | | | | | Focus the phrasing on what it teaches - how to use the stream reader - more than the example application of that, displaying it. Update docs: * Changed name to conform to modern guidelines. * Consistently mark \c cbodrump as code. * Fix mentions of CborDumper and CborTagDescription to match code. * Say how the tagDescriptions table is used. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ic12e77cf34caadc9f60527e886f94c76cb8cfeaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use local names to make some numeric_limits references more readableEdward Welbourne2023-03-201-5/+7
| | | | | | | | Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I220f5c2f13c8f01278be806c8e8d6a3a1be8e986 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: fix include order [2/2]: game.hMarc Mutz2023-02-081-3/+3
| | | | | | | | | | | | | | Includes should be ordered from most specific to most general. This means that project-specific includes always come before Qt includes. This example didn't follow that guideline. Fix. Amends 88e8094f18e6581f2b652eb3d82f514ecf687046. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Iafdae9dd8e70ff99882c4344a023a21d15fa3c54 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: make Level ctor explicitMarc Mutz2023-02-081-1/+1
| | | | | | | | | | A QString is not a full representation of a Level, so the Level(QString) ctor should be explicit. Pick-to: 6.5 6.4 6.2 5.15 Task-number: QTBUG-108857 Change-Id: I24b705139e61c4aaf59cb0aad3b536013e0d07df Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: use ranged instead of indexed loopsMarc Mutz2023-02-082-4/+4
| | | | | | | | | Modernizes the code, and fixes qsizetype/int mismatch. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 Change-Id: Id4262ee0bcb673d62135a81c30976903eef3e5e2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: use NSDMI, =default the default ctorMarc Mutz2023-02-082-6/+4
| | | | | | | | | Modernizes the code. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I6ddf1de3699506ffc0fc4b1034ab48defafcf174 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: fix include orderMarc Mutz2023-02-082-3/+4
| | | | | | | | | | | | Includes should be ordered from most specific to most general. This means that project-specific includes always come before Qt includes. This example didn't follow that guideline. Fix. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I42727ff8bdef5336368cde349cbcb8d10bb6289f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* savegame ex.: fix extra ';' after Q_GADGETMarc Mutz2023-02-081-1/+1
| | | | | | | | | | | Fixes compiler warnings. Amends 1ff52e478bab33f3aaba5ec185295411a0e6867d. Task-number: QTBUG-108857 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Id8b81c67e55baf490aabd0483b5800b3e61965ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Examples: Fix CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-014-12/+14
| | | | | | | | | | Disambiguate variables and add some exclusions. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ie72b3caab9fd571c3fb6f7d8606584885bc09e66 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Link update for Data Input Output in the save game exampleJaishree Vyas2023-01-051-1/+1
| | | | | | Pick-to: 6.4 6.5 Change-Id: I2a886766d59b9e75f42e401fca9c258fcbe02809 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Use const reference in loop in JSON Save Game exampleAleksandr Reviakin2022-12-051-1/+1
| | | | | | Fixes: QTBUG-108857 Change-Id: I503a3c9ebe145d0dae52b74435212807405f0247 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Examples: Use PRIVATE CMake linkageKai Köhne2022-11-303-3/+3
| | | | | | | We (almost) only build apps, for which PRIVATE linkage makes more sense. Change-Id: I09a509c3fb33a00cdfdede687b3f95d638f42091 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Examples: Use qt_standard_project_setup()Kai Köhne2022-11-173-6/+6
| | | | | Change-Id: I0ceab08108b7e58e4e2ed25db9e3c289f5c0ddac Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Examples: Use Qt6:: to qualify Qt CMake packagesKai Köhne2022-11-173-3/+3
| | | | | | | This is what we promote also in the documentation. Change-Id: If91aebafe861b0c934acbb2c69afd182abc3345d Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-112-7/+7
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Add CBOR documentationØystein Heskestad2022-09-017-5/+145
| | | | | | | | | | Add documentation of usage of CBOR in convert and cbordump examples, add a CBOR overview, and add links to them other places in the documentation. Task-number: QTBUG-85912 Change-Id: I518792db63647bf9ddd4507d8d4b7ef056192f82 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-234-4/+4
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>