summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Move OpenGL examples to '3D' categoryTopi Reinio2024-02-212-2/+2
| | | | | | | | Task-number: QTBUG-122377 Change-Id: Id4c765c128ad2e90cacfffaa3f798bad349e71e8 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit e858e86c9fb5f74f0c47d93cf46b98ec0081db96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Assign a category to Contiguous Cache ExampleKai Köhne2024-02-191-0/+1
| | | | | | | | Pick-to: 6.6 Change-Id: I98e62adce63df7e940d96cd50dcb243366dca216 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit f54d222d223262b07580a082f95a9f9935d5743f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Resolve qdoc link warningsPaul Wicking2024-02-152-4/+6
| | | | | | | | | | | | - Drop link to non-existing documentation. - Reorder links such that the target becomes the text and vice versa. - Use correct link target names. - Add missing qttestlib doc project dependency to qtwidgets. Change-Id: Iaa0ea7b22326c82271b14b17c4b78c3a25a834f1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit f157422c58475b3b818b0dddc31289e7105967c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use the unique resource identifier in editabletreemodel exampleAlexey Edelev2024-02-141-1/+1
| | | | | | | | | Fixes: QTBUG-122210 Pick-to: 6.6 Change-Id: I86200961384de6fd57f5c140120461faada4fb4d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 3f312908804ff8871d60b9227e057362d02b34ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: request POST_NOTIFICATIONS permission for Android NotifierAssam Boudjelthia2024-02-073-0/+14
| | | | | | | | | | | | Android 13 and above requires the notification permission "android.permission.POST_NOTIFICATIONS" to be requested at runtime. Pick-to: 6.6 6.5 Fixes: QTBUG-121668 Change-Id: I38512ffc07c1a3ffe7cddffa937b98332f172d15 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 7fa6d09ca20b27b8350e6e26040372ba70e6244d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix style extraction when set to noneAssam Boudjelthia2024-02-071-4/+0
| | | | | | | | | | | | If extract_android_style meta data is set to none currently the app still tries to extract full stlye and crashes. If this option is set no style data should be extracted after this patch. Fixes: QTBUG-121667 Change-Id: I764e1eb6a582073196f991ca930d245d17a1f7e5 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit ff6a6d3285c48d5e54bf03361115116f58461e33) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the icons in the system tray exampleEd Cooke2024-02-075-0/+0
| | | | | | | | | Update the icons for bad, heart and trash in the system tray example. Fixes: QTBUG-119127 Change-Id: I0b6d4600397a0cb2a5474da04297ab92689358cd Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 1878556f25cb86ecefc986a92801c3cbe421ca8b)
* Update visuals of remote controlled car exampleMatthias Rauter2024-02-0616-76/+114
| | | | | | | | | | * Added icons to the controller. * Keep the car within the scene. * Removed the ui file because 4 buttons can be maintained in code easier. Change-Id: I10af821beb442939e1e7fbdd3ffbde67a272bb2f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 29a4323974a1877faf389637be40688e3bc1790d)
* Update icons in the torrent exampleMatthias Rauter2024-02-0626-36/+144
| | | | | | | Fixes: QTBUG-118876 Change-Id: I7b3c24db220a0501bc2b99341589211bdf217c05 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 0da459ec5bc5c92aed5de0e819778b6dd891ceef)
* Menu example: Use theme iconsFriedemann Kleint2024-02-022-18/+36
| | | | | | | Change-Id: I7f77457b439919e7a7882f23e21e648d8965859a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4aa2e594ff055e46c56734a2c0838c214c6bce88) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples/sqlbrowser: improve coding styleChristian Ehrlicher2024-01-197-194/+248
| | | | | | | | | | | | Fix the coding style to match the current Qt style. Fixes: QTBUG-68661 Fixes: QTBUG-120909 Change-Id: I314ca9da8a03727e3e0336a23fce1ce9d065d3a4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 2690822428deec4f0c08f4d118d69a7c6036369e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QRhiWidget API based on review commentsLaszlo Agocs2024-01-181-27/+27
| | | | | | | | | | | | | | | | | | | Spell out some API names in enum. Some functions are now protected. Remove property for autoRenderTarget. textureFormat -> colorBufferFormat. Used "fixed" instead of "explicit" and follow the above naming, so that explicitSize becomes fixedColorBufferSize. Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit acebb97b58807d1d5910c79209664b21e741a9c5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: fix drag examples for webassemblyLorn Potter2024-01-164-1/+15
| | | | | | | Change-Id: I47903743685fadfe33820e7785b72d62109e77d0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 39f81d14c1c0a09ff5165fa11b8369f8ae010ef4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Create separate Graphics and Multimedia example categoriesJaishree Vyas2024-01-1629-29/+29
| | | | | | | | | Fixes: QTBUG-117884 Pick-to: 6.6 Change-Id: I33c7b1cbfaeae866dffb0e89a5d09d775736d886 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 98ee4d9e37a1038d46f0c0494332c0ed46dbb323) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix warning on SQL Browser startupKai Köhne2024-01-131-1/+2
| | | | | | | | | | | | | Browser::addConnection is not a slot/invokable, and requires arguments. What was probably meant to happen is that the connection dialog opens. Pick-to: 6.6 6.5 Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: remove redundant comments from notifier example manifestAssam Boudjelthia2023-12-211-5/+1
| | | | | | | | Task-number: QTBUG-115020 Change-Id: I29cd7a45f85bc85f6f12b135287b9eb868a7bc44 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit 8cc84a1386b77701ebc9c9d4efbc1b033d0e326b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove the style plugin exampleVolker Hilsheimer2023-12-2118-423/+0
| | | | | | | | | | | | The snippets in the QStylePlugin class documentation show the relevant bits well enough. Pick-to: 6.6 Fixes: QTBUG-119974 Change-Id: Iba4a37664d64d86a2946f41d131a201ccdcd723b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 5a0135fafb16203a812163f7ed55c1b981477cb5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update ImageGestures exampleDoris Verria2023-12-215-5/+15
| | | | | | | | | | | | | | - Update screenshot - Provide some information text on the screen when no images are found - Add all supported image formats to the file filters - Minor fixes according to our coding conventions: eg. don't shadow variables Fixes: QTBUG-119979 Change-Id: If41adf34f38bfa101f2c5433082828c1a10668b1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 30e6d822327d8105d209af10d077512f21ecc12c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove echo pluginAxel Spoerl2023-12-2119-529/+0
| | | | | | | | | | Remove echo plugin code and documentation. Fixes: QTBUG-119981 Change-Id: I4083ac6cdb768facaed041241af2c5ee6e28df50 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 01bf423d67d5e6f8de5ec51a6b85178492681ca9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Minor updates to the "Touch Knobs" exampleVolker Hilsheimer2023-12-212-0/+1
| | | | | | | | | | | | | | Turn on anti-aliasing, and update screenshot. The example is still not great and under-documented, but at least it doesn't look horrible anymore. Pick-to: 6.6 Task-number: QTBUG-120291 Change-Id: Ie709cb51d64c535d7cd0aa1451b3c5bb901324cb Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 2b9d021ba5487f7f5f67b958a17160c4cf468561) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Turn SpinBox Delegate example into snippetsVolker Hilsheimer2023-12-218-310/+0
| | | | | | | | | | | | | | The essence of the example was already fully quoted in the model/view documentation. Move the code into a snippet source, and update the screenshot. Fixes: QTBUG-119976 Pick-to: 6.6 Change-Id: Id2f10bb26a650419969bbfa9b76cb74babd3319e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> (cherry picked from commit 99eaae4323ff1fda2d8cc0184d824b6d9c3f23ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Add Qt6::Gui editabletreemodel and simpletreemodel testsAssam Boudjelthia2023-12-202-0/+12
| | | | | | | | | | | | Android needs the Gui dependency. Amends 283cdcd3d5fad368c9df1bcae69cbfbf9ade623f. Pick-to: 6.6 Fixes: QTBUG-120257 Change-Id: Id02b03b9fa08546bc5a126b3e71e67bdd65f8b66 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 4d7ac732557f397cc24c47bc5469db60a0c2a2cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix documentation issues for Qt CoreTopi Reinio2023-12-192-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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(). 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> (cherry picked from commit 96740ea3fed8a7837dc282135661723858fff198) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update Sliders exampleVolker Hilsheimer2023-12-195-136/+97
| | | | | | | | | | | | | | | | | | | Simplify the "responsive layout" implementation. Just use a QBoxLayout with changing direction instead of repopulating a QGridLayout, and change the orientation of one set of sliders instead of creating two sets in a stacked layout. Simplify the resizeEvent() implementation accordingly. Update the documentation snippet text to match the code, and document the resizeEvent() override. Pick-to: 6.6 Fixes: QTBUG-119977 Change-Id: I73a1bb215c956fa283291ebf0ea45ff9a975c727 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit f3fb89ba298e1741320d8bfac9cbd0d503373bff) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move the settingseditor example into tests/manualVolker Hilsheimer2023-12-1517-1346/+0
| | | | | | | | | | | | | | | | | The example uses QTreeWidget when it should use a QTreeView with a dedicated item model, primarily shows how to use item views (and very little about QSettings), and is generally not useful to show how an application could or should use QSettings to store settings. Turn it into a manual test instead; it's useful for that as it supports ini and plist files, and settings in different scopes. Fixes: QTBUG-119978 Change-Id: I7ce039f6391c41c679d126d90a251eee60327c39 Reviewed-by: Ed Cooke <ed.cooke@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit bddf27cd5a5412c8282fab43111e7319874ca44e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: fix touch handling in painting examplesVolker Hilsheimer2023-12-151-3/+6
| | | | | | | | | | | | | | | | | | | | | | On macOS, we don't deliver a press event for the first press on the track pad (Qt::WA_TouchPadAcceptSingleTouchEvents is not set by default, so Qt doesn't deliver a single-press on the track pad as a touch event - that makes some sense or at least maintains compatibility). Because of that, point 0 is never added to the finger-mapping hash. When point 0 is then released, we didn't check if we found a valid iterator for that point ID, and the example crashed. Fix this by checking that we have a valid iterator before dereferencing, and by handling Stationary events in the same way as pressed (add the point to the mapping if it's not already there). Pick-to: 6.6 6.5 Fixes: QTBUG-110266 Change-Id: I32337b801aaabf9b821a97ddc15ad78747b5e6a2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 9d8473cdf63537dee65e9c235249b4e4901baa1a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the books exampleEd Cooke2023-12-1412-241/+184
| | | | | | | | | | | | | | | | | | | | | | | | | Remove the .ui file and write the equivalent implementation. Replace the outdated star icons with new star icons. 5 empty stars are now provided and filled in depending on the rating. The new stars are SVG, however, we do not use an SvgRenderer as we cannot use the QtSvg API from QtBase directly. It is safe to assume the SVG image loading plugin is present, the worst case scenario would be empty icons, but it would still build. We instead use QIcon. For the rating, draw the star icons in a combobox, replacing the old spinbox. Update the layout by moving the table view to the bottom, and arranging the input fields at the top. The scrollbar policies have been set to Qt::ScrollBarAsNeeded for the table view. Fixes: QTBUG-118476 Pick-to: 6.6 6.5 Change-Id: I27c13534ab06e17531d155469a1cc6e7e05197af Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 76b2852b7cff183ba31d6b09b00cbabdffb9ba71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Turn the "concentriccircles" example into snippets, update screenshotVolker Hilsheimer2023-12-1410-484/+0
| | | | | | | | | | | | | | | The example has a lot of code and documentation, but in essence shows how to use float-based QPainter APIs and how to set a render hint. That is two lines of code, which we can show as snippets. Update the screenshot of the example with a higher-resolution version. Pick-to: 6.6 Fixes: QTBUG-119983 Change-Id: Iafcb813dff6ab8c269176f7994c95947ebf5e559 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 33254fb41f29b510d3d74dbaab60f0a67ef56d46) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* examples: Update content of "draggabletext"Audun Sutterud2023-12-141-35/+29
| | | | | | | | | | | Qt Quarterly was shut down long ago. Fixes: QTBUG-119982 Pick-to: 6.6 Change-Id: I910b03ab11bf9aa728cc23d736a6f13902b6fcfe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 8d0d520cd313a653226f734ef819021f83e66721) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SimpleTreeModel: Polish TreeModel::setupModelData()Friedemann Kleint2023-12-062-34/+26
| | | | | | | | | | | | | - Use QStringView. - Use a list of a pair-like struct to represent the state instead of 2 lists. - Use qsizetype. - Use constLast() to avoid detaching. Pick-to: 6.6 Change-Id: Icc3586451f081f6166fece52675d5379160f51da Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Polish the SimpleTreeModel exampleFriedemann Kleint2023-12-066-61/+52
| | | | | | | | | | | | | | | | | | | - Fix/silence most clang-tidy/compiler warnings * unsigned/int comparison * Avoid repeating return / default parameter types * Make functions static/use static invocations * Use string literals everywhere * Use auto * for pointers * Streamline code, use ternary operators * Move constructor parameters * Observe rule of 5 by using Q_DISABLE_COPY_MOVE - Add some bells && whistles, resize properly, expand all Complements 25027444a9b53d61a6257dc5f5ce0ffdb3b06f98. Pick-to: 6.6 Change-Id: I78f48d187981ecabf69a5d4d42715bad026fa9e6 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* EditableTreeModel: Add a testFriedemann Kleint2023-12-063-1/+79
| | | | | | | | Add a test running QAbstractItemModelTester on the model. Pick-to: 6.6 Change-Id: I40c141c7e754ca05234da611534bd65e456be2fb Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Polish the EditableTreeModel exampleFriedemann Kleint2023-12-066-44/+41
| | | | | | | | | | | | | | - Fix/silence most clang-tidy/compiler warnings * unsigned/int comparison * Avoid repeating return / default parameter types * Use auto * for pointers * Streamline code, use ternary operators * Move constructor parameters * Observe rule of 5 by using Q_DISABLE_COPY_MOVE - Add some bells && whistles, resize properly, expand all Change-Id: I1721458ff66dcba123ff3a2cf50e7d15387a4e8b Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Docs: Add stereoscopic example to OpenGL examplesSafiyyah Moosa2023-12-051-5/+10
| | | | | | | | | | | | This fix uses the \ingroup command to add the stereoscopic example to the examples-widgets-opengl group. I also elaborated on the hardware requirements. Fixes: QTBUG-119280 Pick-to: 6.5 6.6 Change-Id: I6d5b992e533b897d84100f0f897aae97ef89290f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* examples: update local fortune example to use transactionSamuel Gaist2023-12-042-12/+5
| | | | | | | | | | The local version of the fortune server and clients were not using the transaction paradigm yet. This patches fixes it and makes the example in line with the network version. Pick-to: 6.6 6.5 Change-Id: Ieb68f67e2921f46acd682f81dfa5dc5b040c88f5 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* EditableTreeModel: Polish TreeModel::setupModelData()Friedemann Kleint2023-12-042-34/+25
| | | | | | | | | | | | - Use QStringView. - Use a list of a pair-like struct to represent the state instead of 2 lists. - Use qsizetype. - Use constLast() to avoid detaching. Pick-to: 6.6 Change-Id: I5ff8a17a4d583a7d2a0a11a52c29b9117280382c Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* SimpleTreeModel: Add a testFriedemann Kleint2023-12-043-1/+78
| | | | | | | | Add a test running QAbstractItemModelTester on the model. Pick-to: 6.6 Change-Id: I6ea5d34308357409b9a13eb0271392c8d171addd Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: PainterPaths-Graphic&Multimedia-Example typo in the documentationJaishree Vyas2023-12-011-7/+4
| | | | | | | | | Changed the brief and some grammatical errors. Fixes: QTBUG-119602 Pick-to: 6.6 Change-Id: Ib64abeb735899b0ae1cee64709ad3d7f8f440d9e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Match descriptive text with code snippetAndreas Eliasson2023-12-012-2/+2
| | | | | | | | | | | | The code snippet reads QDataStream::Qt_6_5. Change the post-descriptive text to match this. Fixes: QTBUG-118907 Pick-to: 6.6 6.5 Change-Id: I3b3d03e9095a6ba6febfb652b3bc7173ed4ccfa4 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* SQL/drilldown example: add new icons and misc cleanupChristian Ehrlicher2023-11-2312-21/+17
| | | | | | | | | | | | Cleanup the drilldown example: - use icons with the current style - remove unneeded QOverload<> - remove some empty lines which don't look good in the documentation - use Q_SLOTS/Q_SIGNALS instead slots/signals Fixes: QTBUG-113696 Change-Id: I62476a8989c0abd1f424d1425cb05489491e2153 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refurbish the shaped clock exampleMatthias Rauter2023-11-171-21/+34
| | | | | | | | | | | | The shaped clock example has the appearance of the analog clock, which was refurbished with 619ec1a6406a8be7bfa9d96b9e693e7a3323d8dc. This change applies the refurbished design to the shaped clock. Task: QTBUG-118871 Pick-to: 6.6 Change-Id: Ibcfc8e9fb239a1c6f7ea685f6cab1e50b2060a53 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make contextinfo example a manual testLaszlo Agocs2023-11-179-726/+1
| | | | | | Change-Id: I9023016d50e82bba1fa73632cc1409b3d016f352 Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove undocumented embedded examplesLucie Gérard2023-11-1747-3671/+1
| | | | | | Task-number: QTBUG-119117 Change-Id: I7fd104742771e2ce6d4ad7afd66e2beca3b4f672 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Refurbish the clock exampleMatthias Rauter2023-11-133-63/+91
| | | | | | | Fixes: QTBUG-118871 Pick-to: 6.6 Change-Id: I0a1a6444cb381d49adbc39e73d7862c9cfe61dce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix broken capture in hellovulkancubes exampleLaszlo Agocs2023-11-091-1/+1
| | | | | | | | | | | | | Amends 339323b999feed077adecc0afaa215f8caffc043 Capturing a function argument (or any local variable) by address is a bad idea. Fixes: QTBUG-118912 Fixes: QTBUG-118986 Change-Id: I521d319a37f7acd6c66732f5f7d3cf1be4d49029 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Doc: Add HTTP Client example also to Web Technologies categoryKai Köhne2023-11-061-0/+1
| | | | | | | | | | | HTTP belongs to Networking, but also fits well with the scope of Web Technologies - qtnetworkserver is there after all, too. So just add the example to both. Pick-to: 6.6 6.6.0 Change-Id: I588e4e0eefc92ba396fbb21d6f55b33f68332a74 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* 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>