summaryrefslogtreecommitdiffstats
path: root/examples/corelib/serialization
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Add deployment API to our examplesAlexandru Croitor2024-03-224-36/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects were modified using the tool at: https://git.qt.io/alcroito/cmake_refactor A couple of examples had to be adapted manually, due to them including more than one app per example subdirectory. The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were removed. The install(TARGETS) calls were modified according to our documentation snippets for qt_generate_deploy_app_script. A qt_generate_deploy_app_script call was added for each executable target. Note that the deployment step will be skipped in the CI for now, because we enable QT_DEPLOY_MINIMAL_EXAMPLES and thus QT_INTERNAL_SKIP_DEPLOYMENT, and also because standalone examples are not enabled yet, and deployment is disabled for in-tree (so no-standalone-example) prefix builds. The install(TARGETS) calls for each example will still run, installing the examples into an installed_examples directory, that will not be archived by the CI. Pick-to: 6.7 Task-number: QTBUG-102056 Task-number: QTBUG-102057 Change-Id: Ida389bbad41710b2ae5da4d95e2d85be9e0cd9ce Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Correct license for examples filesLucie Gérard2024-03-075-5/+5
| | | | | | | | | | | | | | Example takes precedent over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: Id348a89884bb309b96abb31077f14a51086b5d0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Fix documentation issues for Qt CoreTopi Reinio2023-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix template arguments in \fn signatures for Qt::compareThreeWay() functions. * Fix template arguments in \fn signatures for QDebug::operator<<() functions. * Fix \sa links to specific overloads of QSpan functions. * Fix \sa links to specific overloads of QFileInfo::fileTime(). * Remove references to 'Custom Type Example' (example has been removed). * Fix linking to 'JSON Save Game' example. * Fix references to 'Queued Custom Type' example. * Fix linking to QCryptographicHash::Algorithm. * Fix linking to Qt Qml module. * Fix undocumented parameters in qHypot(). Pick-to: 6.7 Change-Id: If9eb9978a14e147f003672a682972b319454c311 Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Rework documentation of the serialization converter exampleEdward Welbourne2023-11-015-59/+140
| | | | | | | | | | | | | | | | | | | The documentation was previously code-heavy and short on exposition, while focusing almost entirely on the CBOR converters. Prune most of the CBOR code quotes, shuffle some snippet markers, add and remove others and rewrite the main text. Shift focus to the base-class for converters and how it's used by main(). Retain relative focus on the CBOR converters, as they are relatively full-featured hence illustrate more than the others do, and replace the sequence of single-line sections about the others with a section collecting all into a table and saying some general things about them. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I8d41f25c165eb1a7ba20cb68aee6ab6b2fd050f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Eliminate duplicate overrides of Converter methods in exampleEdward Welbourne2023-11-0112-82/+21
| | | | | | | | | | | | | | | | | The Out-only converters shouldn't need to implement loadFile(), as it shouldn't be called - a converter is not used for input unless it says it supports input. At the same time, provide the "ground state" implementations for optionsHelp(), outputOptions() and probeFile() to save the trivial implementations the need to duplicate one another. In the process, make the handling of loadFile()'s outputConverter more consistent among those that do implement it. Always set outputConverter if it's initially null (the caller does assert this). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I856d12c791d1f8e0accdb7dd1412d493117b2302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move Converter class, in eponymous example, to a file of its ownEdward Welbourne2023-11-014-22/+27
| | | | | | | | | | There's more details coming and it's good hygiene anyway. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ief3acf6e508bc93eaa8490f6c49300b25c1d3556 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Break out the list of available converters to a static methodEdward Welbourne2023-11-012-10/+20
| | | | | | | | | | | | | Mostly to pave the way for moving the class code to a file of its own, but this incidentally saves the need to std::as_const() every use. Moving the underlying object to a local static of a private method also saves the need for heap allocation (which was leaked). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I30f4bf3c46d39e04d0ac4e3e9ba431945ebb9193 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Replace confusing member variable with a predicateEdward Welbourne2023-11-014-4/+7
| | | | | | | | | | | | | | | | | | | The Converter class, in the eponymous example, had a null member variable that wasn't a nullptr - it pointed to an instance of NullConverter - so that other converters could test whether a Converter * they'd been passed was null (in the sense of pointing to a NullConverter). This, however, was susceptible to misreading - I misread one such comparison as a nullptr check and thus thought it redundant with an earlier actual nullptr check. To spare future readers similar confusion, replace the public static member variable with a protected (since only other derived classes need it) static predicate, to at least give the reader a clue that this is using the word null in a class-specific sense. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1e4f494b303d1bf90107f8c6fa3a4a22f6d81b90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename Convert Example to Serialization ConverterEdward Welbourne2023-10-302-4/+4
| | | | | | | | | | | | The old name didn't say what sort of thing it was converting; and our guidelines for examples discourage using the word Example in the title. Also reword the description of the tool in the command-line parser and an assertion. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I6f52f5227362b4b807c8aabfd2103287af42bca0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Convert fprintf(stderr, ...); exit(EXIT_FAILURE); to qFatal(...)Edward Welbourne2023-10-307-91/+62
| | | | | | | | | | | | The serialization conversion example used raw C's way to abort on error; change to using Qt's way of doing the same. Likewise, convert the various other uses of fprintf(stderr, ...) to qWarning() and of printf(...) to qInfo(). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ia8821d3c20f58f71c106028ec422ad473c11e164 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Make Converter::saveFile() consistently error on unexpected optionsEdward Welbourne2023-10-301-1/+4
| | | | | | | | | | Have the text dumper do the same as all the others, instead of ignoring unknown options. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I3c1dcbeda19e679be562110e44c5f566dfcc79ce Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Rename the JSON Save Game Example to Saving a Game to FileEdward Welbourne2023-10-201-1/+1
| | | | | | | | | | | Partly because it also saves to CBOR, but also because our guidelines say to avoid using "Example" in the title. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Id858475a6b0474228cfe8044e188cc763f56e3a8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Split VariantOrderedMap out of Converter's header in exampleEdward Welbourne2023-10-168-15/+31
| | | | | | | | | | Although used mostly in the same files, they're separate types, so define them in separate places. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I9e64b382ad48f9a74e432ccd49b6f5fcc9316da3 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove unused Map alias for VariantOrderedMap in convert exampleEdward Welbourne2023-10-161-2/+0
| | | | | | | Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ic82f7961df5f7a5bb0cd6cc113e4019508e58f47 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Deduplicate code in setup of serialization convertersEdward Welbourne2023-09-281-82/+49
| | | | | | | | | | | | | | | The setup of the input and output converters is fairly complex but was made harder to read by nearly-duplicating its logic for input and for output. Break out into a separate function to make clear what parts differ between the two and what parts don't. In the process, allow the search for a named converter to continue past a match that doesn't support the needed direction, on the off chance of a name collision. Make an error message more articulate in the process. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I2a9de8b406c538098076f388fc8a1980b91fe16b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Check input and output converters do support the relevant directionsEdward Welbourne2023-09-151-4/+7
| | | | | | | | | | | | It was previously possible to select an input-only converter for output or an output-only converter for input. Also add a comment to explain why failure to probe for the auto output converter isn't an error, where failure to probe for the auto input converter is. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I17dfbbee7d8b5a9629e66d0e1a6a4014b01a7262 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Replace the image to illustrate the Serialization ConverterEdward Welbourne2023-09-151-0/+0
| | | | | | | | | | | | | | The old image wasted a log of space, was poorly legible and showed little more than the cbordump example's illustration shows. Make explicit that we get an initial CBOR file from savegame, show how it can be converted to and from XML (idempotently) and still find space to show the same thing as before. All more legibly and in a smaller file. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ifc599d0dd646f136ccd2860ca927186d478b0fb9 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
* Make \brief of Saving a Game to File actually briefEdward Welbourne2023-09-111-2/+1
| | | | | | | | | | | | Specifically, prune it to fit on a single line. Much of what it was saying was implicit in its context already. It also neglected to mention CBOR's part in the story. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I161a345cbbea8b706490fcbbadecd01b8946af31 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Turn Directions enum into an enum class in serialization converterEdward Welbourne2023-09-089-13/+15
| | | | | | | | Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ie1f8ea5e2575427528c19875db7a8e4e27200aec Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Turn Converter::Direction into a QFlags enumEdward Welbourne2023-09-0816-22/+24
| | | | | | | | | This lets us testFlag() instead of using raw bit-field operations. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I2c26e9a24728e81baa42cf14c75271a015460913 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Serialization converter example: const-ify the Converter typeEdward Welbourne2023-09-0816-129/+143
| | | | | | | | | | | | Its methods act on their parameters without changing the converter, so can all be const. Its instances thus have no non-const members to exercise, so can always be const. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ifcdb2f2159c2cfcd7998dd118aa327a32d299ccf Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Separate streaming dumper and converter in the convert exampleEdward Welbourne2023-09-087-102/+124
| | | | | | | | | | | | The two were in the same files but mostly unrelated to one another - aside from the converter defaulting to the dumper for output. Furthermore, the dumper actually uses QDebug and QTextStream, not QDataStream; rename it to reflect this reality. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Id65c120c319b555039f7fd186ed262f35ff5260a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* corelib/serialization examples: clang-tidy and coding style clean-upEdward Welbourne2023-09-0820-118/+75
| | | | | | | | | | | | I overrode clang-tidy where it uglified or obfuscated and did some clean-up provoked or made possible by its changes. Konrad pointed out, in review, a constructor that could be = default; it could, in fact, vanish entirely as a result. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I9b7744a3abaa29e6f9e0689d0f6985bfd88cd0fd Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* corelib/serialization examples: use string literals moreEdward Welbourne2023-09-089-107/+121
| | | | | | | | | | | | A couple more compilation units could use Qt::StringLiterals. Prefer QL1SV for the code constants, to keep code small. Convert fpToString() to take QL1SV instead of const char *, with suffix empty by default. Also rearranged some spacing, some if it suggested by clang-tidy. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I03d810d52afcd4a760d18f2553914b75af716b74 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Minor tidies in example's XML converterEdward Welbourne2023-09-051-2/+2
| | | | | | | | | | Make a local variable more local, set a variable only once its new value is known to be valid. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ib6aa16e8c834f89c6ccc0715f20b0e5f0a7f3b6d Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* Exploit C++17 init-statements in if to simplify a loopEdward Welbourne2023-09-051-12/+5
| | | | | | | | | | | The serialization converter example's text converter's loadFile() can be made tidier by making the conditions within its loop into a chain. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ic82355eab7380a0c671b3805ca140958bb1c5af5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
* Update datastream converter to use Qt_6_0 instead of Qt_5_0Edward Welbourne2023-09-051-2/+2
| | | | | | | | | It was added in 5.12 and we've had a few upates since then. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Iacb5368d4baa7d25f981bb0b8bd8d68b5461e17d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Core serialization examples: spacing-only clang-format changesEdward Welbourne2023-09-057-25/+25
| | | | | | | | | Marc disagreed with clang-format on some, which are thus excluded. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1402274635dba866a8160a68211874cb11dcfa61 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Exclude some examples from Android buildElias Hautala2023-08-284-3/+17
| | | | | | | | | | | | Excludes dnslookup, waitconditions, semaphores, cbordump, savegame, convert, pingpong and complexpingpong examples from Android build because of missing Qui and Quick dependenies. Task-number: QTBUG-111933 Pick-to: 6.5 6.6 Change-Id: Ied01f62ee61a9220dcb44c13fda46f6a5e158293 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* examples/: implicit capture of `this` via [=] is deprecated in C++20Ahmad Samir2023-08-181-2/+2
| | | | | Change-Id: I43b04517e9e3a30468c8ce702c9a49968c0ddc4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* XBEL stream reader: rework documentationEdward Welbourne2023-08-031-82/+128
| | | | | | | | | | | | | Document previously-undocumented methods. Document in terms of what each thing achieves, not how it does it. The U+00B7 is not the period, it is the centred dot. Fix various anachronisms; the existing docs were out of date with the actual code. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I17da880e0afd7260aa6f3b7bdddb430c437f4562 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* XBEL stream example: use constructor initializationEdward Welbourne2023-07-172-2/+2
| | | | | | | | | | The treeWidget member of MainWindow could be initialized before the body of the constructor, enabling it to be a *const variable. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: If4a3b04729bc7fa5859ca88183eec376f6992455 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* XBEL streaming example: renumber xbelreader.cpp's snippet fragmentsEdward Welbourne2023-07-102-6/+12
| | | | | | | | | | I'll be adding docs for parts currently lacking them; fix up the numbering first, to disentangle from "real" changes to docs. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ia10f212626bf5ca9fab2b6ba6cf02dbd560a2f02 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* XBEL streaming: shuffle mainwindow parts into more pedagogic orderEdward Welbourne2023-07-102-29/+36
| | | | | | | | | | | | | Renumber the code fragments to match their order, while adding a number for the previously undocumented custom method. Add a brief description of it. Move the createMenus() part up to after it, combine the createActions() with its (as createActions() is long gone, fused into it and sharing its snippet number). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: If0fbcadfa058fc12cbd74ba1897646113bd016b0 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* XBEL stream example: move createMenus() earlierEdward Welbourne2023-07-101-21/+21
| | | | | | | | | | | This will make the description of the type flow more naturally. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I751bdaf420be7afc9cb4925af4f2a94367840605 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* XBEL streaming: replace images with up-to-date versionEdward Welbourne2023-07-107-3/+3
| | | | | | | | | | | The old screenshot showed an old XBEL file's content, with trolltech URLs. Update to match the new XBEL file's content. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Idacc31b7786b1e6ed1425857470b1d37227096cd Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update XBEL examples' sample data fileEdward Welbourne2023-07-101-23/+23
| | | | | | | | | | Most links are now https, several have relocated, one entirely rebranded. Same example in both QXmlStream and DOM forms. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ifbc58dadc834cf51113adb1c82de971a8768ee58 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Update Qt Documentation link title in XBEL examplesEdward Welbourne2023-07-101-1/+1
| | | | | | | | | | doc.qt.io was described as Qt 5 documentation; no need to version-limit it. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1c5abe3d805c2b845a74b9fe454c494fa1eff4c7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Update example category namesKai Köhne2023-07-104-4/+4
| | | | | | Pick-to: 6.5 6.6 Change-Id: If4a50c403ed0fb299ac0d9a66f1f606151c55930 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add missing QApplication include in streambookmarks exampleTor Arne Vestbø2023-06-171-1/+1
| | | | | | | | Amends 3ccf2f8308ba33cab575c22ad2e246b987a3dc0c. Pick-to: 6.5 6.6 Change-Id: Ib51777ef9af44aff7fbb813b58eb0fbb74761373 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Examples: "About &Qt" should show info about Qt, not quitEdward Welbourne2023-06-161-1/+1
| | | | | | | | | | | A few examples seem to have copied and pasted a help action "About &Qt" that triggered QCoreApplication::quit. This does not look like best practice. Use QApplication::aboutQt instead. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1887a3c999d752a24c7c4d3cabc4a5d63b29b966 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Core examples: consistent #include orderEdward Welbourne2023-06-163-6/+6
| | | | | | | Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I014a895a8abeccc9d17b68fb67c00cea22957fed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move RSS listing example to networkingEdward Welbourne2023-06-149-376/+0
| | | | | | | | | | | It's really showing how to request a resource and act on its becoming available. The use of XML to do so is incidental; the use of networking is central. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ibcf438c7ef3b2464ddfa8b96a79fb15523e4a468 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Do XBEL example's last !QT_NO_... -> QT_CONFIG()Edward Welbourne2023-06-141-1/+1
| | | | | | | | | Amends commit 723e331f0a811294e43207db162698c3ff8fde51 Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Ib9a094ab432a80b8b2dbbbecb497dca13d23a553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* XBEL stream reader: Brush upFriedemann Kleint2023-06-134-23/+37
| | | | | | | | | | | - Use mime types in the file dialog handling - Use per class includes - Use the configure system instead of QT_NO... defines Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Iea915604e89d3005270f0eb83eca882855589a44 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* XBEL examples: construct the text of the separators cleanlyEdward Welbourne2023-06-121-1/+3
| | | | | | | | | | | Create the fixed string once and reuse it. Also give a name to the escape code that's its repeated character. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I3d6416070f1d5490ec137e251daff0e1637fb788 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* XBEL stream reader: shuffle order of functionsEdward Welbourne2023-06-121-18/+18
| | | | | | | | | | | Put readBookmark() first of the constituent parts, as it's the most intelligible (albeit currently undocumented) and gives some clue to the purpose of readTitle(), which is next. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I91d3d6bf8adc3f3001c90274bb62a9da6bf05362 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Doc: Fix documentation issuesTopi Reinio2023-06-091-1/+1
| | | | | | | | | | | | | | | | The Qt Widgets Application example was moved to manual tests, and no longer contains the snippet identifiers. Fix \snippet and \quotefile commands to quote similar code snippets from other examples or snippet files. Fix also the following documentation warnings: * No such parameter 'parsingMode' in QUrl::fromEncoded() * Missing image: rsslisting.cpp Pick-to: 6.6 6.5 Change-Id: Ibc989e83abc49837db08628facaf8e5f72b2f123 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* There is no frank.xbel so don't tell qmake to find itEdward Welbourne2023-06-091-1/+1
| | | | | | | | | | | | Both the DOM and XML stream versions of the XBEL bookmarks example had a frank.xbel in their EXAMPLE_FILES, but there is no such file. So asking qmake to include it is spurious. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Iec08042d181fc09c2c428685ce841a13161ab273 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* XBEL example - modernize strings: use "..."_L1 for literalsEdward Welbourne2023-06-093-35/+30
| | | | | | | | | | | | | The XML stream reader and writer accept QAnyStringView arguments these days, so passing a QLatin1StringView is entirely sufficient. This makes static functions to provide access to unique QString instances redundant. Linkers are allowed to uniquify the literals the "..."_L1 reference. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I7f37e97631e11683b9ddd3842fc6233547bed5ff Reviewed-by: Marc Mutz <marc.mutz@qt.io>