summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add XML, Json, CBOR examples to IO categoryKai Köhne2023-05-115-0/+5
| | | | | | | | | Task-number: QTBUG-112372 Change-Id: I867bd33ff08629e03b35eccd4b7418573abe7c68 Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 0de3a17394e947bb04de0a004bb18f7533acfbb6) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Rework imagescaling example to avoid potential crashesIvan Solovev2023-04-263-75/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | Creating a continuation with QtFuture::Launch::Async policy does not work well with the example, because it still needs to update the UI once the async continuation is finished. If the user decides to close the application while the async continuation is executed, the next continuation will be accessing data from the destroyed Images object. Fix it by using QtConcurrent::run() to do the "heavy" work in a separate thread, and use a QFutureWatcher to handle the results of the async execution. Update the example documentation accordingly. After this patch the example still shows the usage of continuations and onCanceled()/onFailed() handlers. However, it now does not illustrate the usage of different launch policies and continuation contexts. It might not be a big issue, because the QFuture documentation describes these topics rather extensively. Fixes: QTBUG-103514 Change-Id: I8142535064ff7a4e8007a5c0a8fe7709d6d942ec Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 5ddb5d1fee52700b71701203ac622b3b363eab46) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android-example: add missing properties in AndroidManifest.xmlBartlomiej Moskal2023-04-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After changing android target SDK version to 31, some missing values has to be defined in AndroidManifest.xml. AndroidManifest.xml template was updated in qtbase in: 56dee3de5e4ac1c4d37a2c5e27361e7ddbdea1a7 commit. In case when example uses its own AndroidManifest.xml file, it need to be updated separately. * android:exported="true": because the manifest sets an intent-filter, and it then has to explicitly to avoid the warning [1]. * android:allowBackup="true": this has to be explicitly set, we set it to the default value here [2]. * android:fullBackupOnly="false": SDK 23+ use this to deteremine to user auto backup or not, we set it to the default value here [3]. [1] https://developer.android.com/guide/topics/manifest/activity- element#exported [2] https://developer.android.com/guide/topics/manifest/application- element#allowbackup [3] https://developer.android.com/guide/topics/manifest/application- element#fullBackupOnly Fixes: QTBUG-112816 Change-Id: Ia48007a84009901be508d6cc087790d574227ad7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit c27d5eca6a229a4ffdd681567b2dca94381847e1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Tune textures example to work with wasm and update docsLaszlo Agocs2023-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Old examples inherited from Qt 4 tend to set some state, such as enabling the depth test or culling, in initializeGL(). Newer examples tend not to do this; they rather set the necessary state in paintGL(). This mattered little (or not at all) in the past, but with WebAssembly and WebGL there are limitations in the GL context management in the wasm platform plugin. Under certain conditions, esp. when QOffscreenSurface is involved, it looks like the same native context gets reused, which means there is a chance of unexpected changes to the current state between calls to initializeGL() and paintGL(). (and also between paintGL() calls) See QWasmOpenGLContext for details. Update the textures example the same way we did for the cube one. Add a note to the QOpenGLWidget docs about this problem. Task-number: QTBUG-111304 Change-Id: I29d2b2cdeb07bcecc5dc915d79c12b4323ca9ab3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit 5ebb9a8bf357b435a9d9cf56ae018f552c96d03c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* cube example: always set required state in paintGLLaszlo Agocs2023-04-201-8/+8
| | | | | | | | | | | ...instead of expecting whatever was set in initializeGL will persist. Task-number: QTBUG-111304 Change-Id: Ifcf75a3df9bed6a45d2e9264a5e3f32504b42313 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 25fcded977e5283ff0e33e0465abbb544a41f30e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Change-Id: I7d5e968284e0f1da2ec990af9512c9b7cb886792 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit bcab157f75add9b2ac3c69e9c2c0399c71a7df5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* cube example: Switch to a power-of-two textureLaszlo Agocs2023-04-191-0/+0
| | | | | | | | | | | | | | | Just to make sure it runs with strict WebGL 1 implementations. This cannot generally be a solution, naturally, so requiring WebGL 2 is more likely the way to go, but in the case of this example it seems the only thing we need is to resize the image file, so we might just as well do that. Task-number: QTBUG-111304 Change-Id: I1b4a72ac1a7b94575bf1abd61c5aa722959c92e4 Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit 051ba40997a230ceac23c73b0e7ff75127485c31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* cube example: make sure the program is boundLaszlo Agocs2023-04-191-0/+1
| | | | | | | | | | | | | | | ...in paintGL. There is nothing saying the current program (or other state) cannot change between paintGL calls (or initializeGL and paintGL calls). Correctly call program.bind(). This eliminates the WebGL warning with WebAssembly. Task-number: QTBUG-111304 Change-Id: I19792f5f193dcdb305473a939780df33deb1f8e1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 99c8eca3f4364b1e062684dd71efc8c5c4b9059c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-118-8/+8
| | | | | | | | | | | | | | | | | The '\meta category' command was used for tagging examples with a specific category, used in Qt Creators Welcome mode. As we want to also generate lists of examples belonging to a category elsewhere in the documentation, replace the command with a macro that expands to the original \meta command and also adds the example to a group using the \ingroup command. This way, the category names can be used as arguments to the \generatelist or \annotatedlist commands. Task-number: QTBUG-112731 Change-Id: I46762dabc5f718fecc09a3533235eaa911dda5a0 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 45ca5c85855c6107813485e7977ea9a791cba6b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Torrent example: update usage of integer typesMårten Nordheim2023-04-116-63/+64
| | | | | | | | | | | | | Some of the 'int's are purposefully 32-bit because that's what the protocol is, but others aren't. So, be more explicit. Task-number: QTBUG-110622 Change-Id: I338abca1f13b0c95f49a6f52933712f43f147590 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 1a55c8d887bda1e8f1f5accda6633a238674d617) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Docs: don't link to removed exampleVolker Hilsheimer2023-04-111-3/+2
| | | | | | | | Change-Id: I5fcec02cd18971150eec4f119d902c695bf2ebb9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> (cherry picked from commit 70f9158e0f046feba2d5b655a9b3fcc715d2e8be) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Change-Id: If9da4fbe975d9a97939ea01558b2a8cef7ad3a24 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 9834e80833783357743b2a5abe3071760638effb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused variable/codeAmir Masoud Abdol2023-04-082-7/+0
| | | | | | | | Change-Id: I8d28db64c1ae2c57c95b2f9f22303d74172226e9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 9db9a836fbe3a040e6b8e1ee73c7ca2c62a6d888) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix CMakeLists.txt of echo plugin exampleAxel Spoerl2023-04-061-1/+5
| | | | | | | | | | | | | This patch adds a missing dependency to the echo plugin for shared builds. Since it fixes the last remaining example, it closes the Jira ticket. Fixes: QTBUG-112300 Change-Id: Ib1da2d7d5f5d54d7224f1c65a995f3752037e5be Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 947f4df49c0dd07d8df5660d8b19cd4f28c2531d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove hellovulkanwindow exampleLaszlo Agocs2023-03-3111-273/+50
| | | | | | | | | | | | | | The idea being that hellovulkantriangle demonstrates the same things. As a getting started tutorial hellovulkanwindow is the ideal example, but then again QVulkanWindow is not something we want to promote much in Qt 6. Some of the docs are moved to hellovulkantriangle. Change-Id: Icbfff70b4a4c7e4c0863a937f3c16038c0b03fbe Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 0e8d347c6a99c2729eb5d32cfc70f4fb2755f940) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move streambookmarks example into corelibe/serializationØystein Heskestad2023-03-3118-25/+27
| | | | | | | | | | | | | 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 Change-Id: Id36fb04a6acb7b8d1eb008f61568fe0abc221e3d Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 29317b426b9ec84f4ba66e6c032f71c2a2bae091) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* complexpingpong example: Modernize the codeIevgenii Meshcheriakov2023-03-314-39/+41
| | | | | | | | | | | | Use C++ IO streams and qWarning() instead of (f)printf() for console IO. Make user-visible strings translatable. Use invokeMethod() instead of QTimer. Fixes: QTBUG-111366 Change-Id: I6990b964c2097267e04cd361b9cd8fc0a22a0135 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 7b9e7f8002f001189600abac3ce63a52c78a24e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove broken link to Anchor Layout ExampleAndreas Eliasson2023-03-311-2/+0
| | | | | | | | | | This example was moved to manual tests in 6.5, which broke the link. Now that it's in manual tests, I guess we can stop promoting it. Change-Id: I1aa4a7de5123e96bf9ff56eeae49104acdce9645 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 9f93f96394fd4ab209ba45cd99753b9c7edcf373) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move rsslisting example into corelibe/serializationØystein Heskestad2023-03-319-8/+10
| | | | | | | | | | | The implementation of the stream-based XML parser resides in coreslib/serialization. Moving the rsslisting example there. Task-number: QTBUG-110647 Change-Id: I862909e767301250750b6ee0d8ac7e20d6bad2b1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 10b4c06b4928d12addc7e55e4a6e5ed537a63942) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move hellogles3 docs to where the rest of these files liveLaszlo Agocs2023-03-313-0/+2
| | | | | | | | | | And expand the note in the openglwindow example to point to hellogles3 as well. Change-Id: I2c0ee9b83fa59752d937c57eaf0194f0d0a8a7d9 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 7c23aa6bc5e5d7b6e891fb0c30a72091a60c79eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove erroneous widget dependency for hellogles3Laszlo Agocs2023-03-313-3/+9
| | | | | | | Change-Id: I42b476be28acd5b5c68f115bd98cf5c43cd8d97b Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit d0dc0477b9c0350a257b284a90a813b2b00d1543) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rework documentation of cbordump exampleEdward Welbourne2023-03-281-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. Task-number: QTBUG-111228 Change-Id: Ic12e77cf34caadc9f60527e886f94c76cb8cfeaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 5c2245cd66894cc27d6d4afcf13499db6434ee2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix pointer mismatch after QList::move() in tooltip exampleAxel Spoerl2023-03-283-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | The tooltip example moves shape items within a QWidget. Shape items are stored in a QList of objects. When an item is moved, its pointer is taken from the QList and stored in a member variable. To have the moved item on the bottom of the list, QList::move() is called. This operation re-arranges the list objects, and the member variable starts pointing at a wrong object. This patch changes the list from a list of objects, to a list of pointers. Shape items are therefore allocated on the heap. A destructor is added to free the heap with qDeleteAll. The example's documentation is adapted accordingly and a snippet for the destructor is added. As a drive-by, int is replaced by qsizetype where it was used as an index of a QList. Fixes: QTBUG-104781 Change-Id: I9be26fa7954be5f85729d24f166d66980af71801 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 585bfe600a158743d68e4c8c81fb1a7106566d6a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: build the shared plugin when building the plugandpaint targetJoerg Bornemann2023-03-281-1/+5
| | | | | | | | | | | | | People expect that building the "main target" of an example builds all necessary subtargets as well. Add a dependency from plugandpaint to pnp_extrafilters. Task-number: QTBUG-112300 Change-Id: I036beb961fe474ff060f93c98f5e2bda58e66f71 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 454b1de22c77b7c4917dfa9d6182b4ea80b49dc5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Example: update wordcount exampleDennis Oberst2023-03-282-63/+126
| | | | | | | | | | | | | | | Added a QFileDialog to let the user select a path. Before, the path was statically assigned with "../../" , which is not optimal. I also modified the findFiles function to check for text files in general and not only *.cpp and *.h files. Lastly the result of the word counting is now displayed on the console, as I think this is an informative output from this example. Task-number: QTBUG-111165 Change-Id: Ie27c6acb4f79a78e3bef141edb92de08901fde71 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit d795dfaee7093a30b278e6e8b9dea30c2e7a2106) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* examples: port xml examples to new connection styleSamuel Gaist2023-03-271-9/+9
| | | | | | | | Task-number: QTBUG-106893 Change-Id: I1cab8949700d7449f0615731c85a77bb9136b0d3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 253a4a146b9e13b0e57adb793bb4ac78b1bad2ab) Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* dbus examples: Remove "Example" from example namesIevgenii Meshcheriakov2023-03-244-5/+5
| | | | | | | | | Task-number: QTBUG-111366 Change-Id: Ia34c60ed4c0ffe5b01cc507dd5e45521c096b0bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 8faf2511da2f425bb044317b5c37c39d27c0a6db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* remotecontrolledcar example: Modernize the codeIevgenii Meshcheriakov2023-03-246-57/+27
| | | | | | | | | | | Also remove unused crashed() signal. Task-number: QTBUG-111366 Change-Id: Ia23552a6396c324c7591643afaa634879a2c185e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit f7167ae82fd74d69f2b138fb60a36ed7f863b380) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* mainwindow example: Fix implicit conversion from qsizetype warningsTor Arne Vestbø2023-03-242-3/+3
| | | | | | | Change-Id: Ifaeeb620420f43529bb9e3d533b4e1a2e20c68ca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 080b11b03989227ad62de625084fc5d57d930d7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove loopback network exampleMårten Nordheim2023-03-249-283/+0
| | | | | | | | | | | It doesn't showcase anything interesting that other examples don't already show off. Change-Id: Ie95c3ddb3ff52b3beab54bd6fa75fb75ae5c7ba5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> (cherry picked from commit 826b606a5d8f274c55f525119299aef2fe143aaf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Clean up multicast examplesMårten Nordheim2023-03-247-6/+10
| | | | | | | | | | They're small, not much to polish. Change-Id: Iada573504de557ab18381370bb9760b1f60cc2e4 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 58dfb107810e292a60984c5ca7f962df0b98a2fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Change paintedwindow example to be a manual testLaszlo Agocs2023-03-237-313/+1
| | | | | | | Change-Id: I25a0f491f824c43fc75ba6358518133ede09adcd Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 9daf2744b284413c8ca6df18bd48082bb7405bf8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move hellowindow and qopenglwindow to be a manual testsLaszlo Agocs2023-03-2314-1028/+2
| | | | | | | Change-Id: I8d1517ee57df9b2dee0486f47562b0754e9dcbad Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 3b015718b0d156bbedafd3f83f069ce5a360d5cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Change computegles31 example to a manual testLaszlo Agocs2023-03-239-603/+0
| | | | | | | Change-Id: I652daf3ccbb921c5eb73b48586ee9616c7704b97 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 5a36f4cd9c6252b98786801f5a33962c1e5a1ca0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move hellovulkantexture example to manual testLaszlo Agocs2023-03-2315-1005/+1
| | | | | | | | | | | Because it is the least documented one, and compared to the other Vulkan examples it does not add anything new, it just dives deeper into Vulkan. Change-Id: Iecf3e04625fba256ea8134da57f54498ee2010db Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit b5b954fac12414c315369344b1664bf220a59dad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove libQt6Xml dependency in rsslisting exampleØystein Heskestad2023-03-212-3/+2
| | | | | | | | | | This example does not use libQt6Xml, remove dependency. Task-number: QTBUG-110647 Change-Id: Ida8c4df0e274cbc2e0a5f7151f18693d7e1c2401 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 3c521e1fb42885e070bf07f36349a1e8cdb39e76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove libQt6Xml dependency in streambookmarks exampleØystein Heskestad2023-03-212-3/+2
| | | | | | | | | | This example does not use libQt6Xml, remove dependency. Task-number: QTBUG-110647 Change-Id: I40e5976121ddc97a78b540d17784b3357b87adf7 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 7185c8e0a46344496de0f516c4d1b4b8f738ccec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix wording in the Simple Style Plugin documentationJoerg Bornemann2023-03-211-5/+5
| | | | | | | | | | | | When talking about QMake project files we now refer to ".pro files" instead of "profiles". Change-Id: Ia8d20a6a03b9076e97f45da272bb3f883febc796 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 29bc561de5ef37672000e33727e69c8407dca109) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Example: rename progressdialog to primecounter and modernize itDennis Oberst2023-03-2114-85/+494
| | | | | | | | | | | | | | The previous example finished way too quickly and provided no real value in regards to API understanding. Previously, QtConcurrent::map was used, which was also used in other examples. We are now using QtConcurrent::filterReduce to demonstrate other functionality. Task-number: QTBUG-111165 Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 8352756d27e5657390b6e87f45e0c0bae6b7784e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* remotecontrolledcar example: Move executables into single example projectIevgenii Meshcheriakov2023-03-214-17/+13
| | | | | | | | | | This allows building of all the example executables at once. Task-number: QTBUG-111366 Change-Id: I1fa372ec9725bfeb1f123305aa7324b7820eb593 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 5cd7900d4f54ee0291017dece003ec06d0d2f831) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* remotecontrolledcar example: Move car.xml to common directoryIevgenii Meshcheriakov2023-03-216-15/+4
| | | | | | | | | | It is shared between car and controller executables. Task-number: QTBUG-111366 Change-Id: I5f98a09664671c55bfad68ebf88c9f0c734511fa Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 2834d4263a5c19587076c4edd3621a0daaa81a56) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use local names to make some numeric_limits references more readableEdward Welbourne2023-03-211-5/+7
| | | | | | | | | Task-number: QTBUG-111228 Change-Id: I220f5c2f13c8f01278be806c8e8d6a3a1be8e986 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 074d3d54d8f67599402f3d175ce0368ef4f13269) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix CMakeLists.txt of Style Plugin Example (broken on macOS)Axel Spoerl2023-03-201-1/+1
| | | | | | | | | | | Add TARGET instruction in property setter, used in debug mode on macOS. Task-number: QTBUG-107842 Task-number: QTBUG-109227 Change-Id: I8704b7009c36ea8ddbf8773abfaf2b5f34f728ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2ae75c2e6a49e84aa10691520752e340a4855b79) Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Fix Style Plugin Example, and add some CMake DocsAmir Masoud Abdol2023-03-207-19/+77
| | | | | | | | | | | | | | | | | | | | | | A few things: - Improved the documentation by adding a CMake section, briefly describing the process of adding the plugin, and placing it where it should be. - Write a note about the case where the style may be overwritten at launch, and how to set the a new style using a CLI - Improved the CMake build such that it creates the App Bundle correctly, and also works without an App Bundle as well. - Changed the example, and plugin such that now instead of a QPushButton we have a QTextEdit, and change the text color. - Replaced the application screenshot Fixes: QTBUG-107842 Fixes: QTBUG-109227 Change-Id: I161a91b27df016ff6230fac3871b79d2dfbdf18a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7fe2537ce20ebf887d71fe0d0d0fb14b429d68be) Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* dbus examples: Update screenshotsIevgenii Meshcheriakov2023-03-156-2/+2
| | | | | | | | | | Use WEBP format to reduce the file size. Task-number: QTBUG-111366 Change-Id: I14ff15010e7ac7e1b375eeafaa1c153b0fdd95e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 20668baa591796e916502cbd51e7ebfe23cc4ca3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Example: update imagescaling exampleDennis Oberst2023-03-145-15/+18
| | | | | | | | | | | | Updated the example to align with the Qt6 Example-Guideline. https://wiki.qt.io/Qt6/Example-Guideline Task-number: QTBUG-111165 Change-Id: Ibd9e7ce0d4dee90f6a693b81516d2f5b86345b1d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b5e9d418959a9d427c14468886470791527e157f) Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Imagescaling example: fix memory leaksIvan Solovev2023-03-131-1/+2
| | | | | | | | | | | | | | * The DownloadDialog was never destroyed properly. Pass 'this' to its constructor to fix it. * When re-creating an image grid layout, properly clean up old image labels in Images::initLayout() Task-number: QTBUG-103514 Change-Id: Ief52774002632d4ad3a6cca85bb0c0aa1a1d4bc0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 0ac234f9e256949cbacb77f94d39fff90caba7b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* dbus examples: Remove listnames exampleIevgenii Meshcheriakov2023-03-106-114/+1
| | | | | | | | Task-number: QTBUG-111366 Change-Id: I5c483cbfec4072dae610c6d98b97d10057ba9ddc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit eea83bac26294db61fe425da3da498f92145f866) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the bindable properties exampleJames DeLisle2023-03-109-47/+43
| | | | | | | | | | | | | - Fix the number of months in each duration - Move the user Country enum to use QLocale::Territory - Properly calculate the cost per month to match the UI label - Use QLocale to format the price display text - Fix some misspellings and grammar in the doc Change-Id: I78a64f344073070cd94d5cb4a8a4c7c13afa337f Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit ed6a3ce0afe639fb40eb6f032b85e90fe35f1cb3) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Example: remove map exampleDennis Oberst2023-03-096-100/+1
| | | | | | | | | | | | | | This example only demonstrates the use of blockingMapped. Considering that the QtConcurrent::mapped~ functions are already included in the wordcount example, and have very similar APIs to the QtConcurrent::filter~ functions, which are included in the progressdialog example, this no longer serves a useful purpose. Task-number: QTBUG-111165 Change-Id: Ibc526e1a9fb17070e376e45151e9c2bdbc69bd32 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit fbb470b40b2c86a55751bf3099cc0424f66c7274) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>