summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix meta data of the Qt Designer "Multiple Inheritance" exampleFriedemann Kleint2023-09-251-1/+1
| | | | | | | | | | | Amends db7a30bd1dca12b04f04a2617d54e22c61e5cf70 Fixes: QTBUG-117214 Change-Id: If95937fd606c05c96b6ee83fd9ad73c771a49781 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit f94f39dd2dc69982419bcc8ba49ab77c7c3b4925) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 36c6e1af6c3d8a55df3400ca6fd6576c5dc083a8)
* lupdate: remove number heuristicsLucie Gérard2023-09-133-26/+13
| | | | | | | | | | | | | | | | Adapt the troll print example [ChangeLog][lupdate][Important Behavior Changes] Removed the number heuristics feature. Users are advised to avoid hard-coded numbers in translatable strings and use QString::arg instead. Task-number: QTBUG-115962 Change-Id: I64e920e7b6496924f2c1ee6d07bea6e73964177a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit cda38d3d08e689deab506a11ed8c54a04d3f40d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit de619b5eec88a677e51d206fb32b5eb47a018108)
* Add ts files in arrowpad exampleLucie Gérard2023-09-133-0/+9
| | | | | | | | | | | | | | To avoid git complaining about untracked files, default ts file created by cmake are added. They still have to be updated like explained in the examples documentation. Task-number: QTBUG-115686 Change-Id: I8b57c4c7e6920e1dcaed8dba7dda4f7088fa604b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 3f16bd02ae50561a6965dae6efec3878801f5e0e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9d201a41af62a9559fa242846c60b4d5e11faa03)
* Doc: Add example category to qtassistantInkamari Harjula2023-09-082-0/+2
| | | | | | | | | | Added category Desktop to remote control and simple text viewer examples. Task-number: QTBUG-116536 Change-Id: I42c196bb6a9f8a402e87f6055bf05eb99603eca1 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 01fd39641c9eb9a596a6f8314e60aa7136908bfd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add example category to qhelpInkamari Harjula2023-09-061-0/+1
| | | | | | | | | | Added example category User Interface Components to contextsensitivehelp file. Task-number: QTBUG-116534 Change-Id: I112c2710df7c93b4282f7192ddb06e84e097d14a Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 58b16c4b0b325b4927ca5d03278576d0bd7775f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* RemoteControl: Revamp the exampleJarek Kobus2023-07-263-93/+63
| | | | | | | | | | | | | | Get rid of automatic ui connections. Replace some simple slots with lambdas. Simplify c'tor. Use QT_VERSION_MAJOR/MINOR/PATCH instead of QT_VERSION. Fix code formatting. Fix the starting link. Use new string literals. Change-Id: I59422e2d8c62713c399e3f330afdcfa47b502d9e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit ea17a599e4d378e4988899e531fa767912f3f13b)
* SimpleTextViewer: Use new string literalsJarek Kobus2023-07-242-8/+12
| | | | | | | Change-Id: I703b7a364cc5e30327850e0a68869e5e7485bada Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit b8eb6d147ae5d2bb1dedadd9aa2aec42d7599afc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SimpleTextViewer: Revamp the exampleJarek Kobus2023-07-247-56/+39
| | | | | | | | | | | | | | Fix const correctness. Fix code formatting. Fix error message on crash. Use initializer lists in c'tors. Limit the start assistant timeout to 3 seconds, like it's done for termination. Change-Id: Idfafa35834fba725b03d80e6252be8ac3eaf489f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit cbcd71aeac7c092c52de3d55f0f303d1cf4cab65) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add explanations on where this example works bestLucie Gérard2023-07-031-0/+4
| | | | | | | | | | This example is not expected to work on Android. Task-number: QTBUG-106380 Change-Id: I09ab5340b0cca0554ef14acb1852befcaae7990d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit a6a2e897092352a3be526cb22410a332573e990c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Remove unnecessary Q_INIT_RESOURCE callsKai Köhne2023-06-051-2/+0
| | | | | | | | | | | | Explicit calls to Q_INIT_RESOURCE are only needed for resources embedded in static libraries. See also https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources Change-Id: I68c383be82478db7967136ccefdc3e4ee688e96f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 5a07ba988eaa4ad7ba5614a9ddb50d7270fe68e3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Clean up Designer's extension plugins examples' qmake filesJoerg Bornemann2023-05-313-30/+0
| | | | | | | | | | The QTDIR_build scopes are not used anymore. Change-Id: Ic722645641419b3beb22ac36a02a862f6e7b179e Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit f64ab44deb8b611911ede70911a57d37f773a3a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Check the return value from QTranslator::load()"Tor Arne Vestbø2023-05-021-2/+1
| | | | | | | | | | | | | | | | | This reverts commit 0a91ac627e84634993fc579d428e4bbc3d0b283a. The example documentation does not match the flow introduced by this change. The example explicitly talks about "No error will occur if the file is not found.", and "If hellotr_la.qm was found and contains a translation for "Hello world!", the translation appears; if not, the source text appears." Q_UNUSED added to satisfy nodiscard attribute. Change-Id: I8e4cb6ed3fb81f7739aacd734f3107a8ec6899a1 Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit d8026c6defb5764eb1ee2649cd530b8f0e708675) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* hellotr: Clarify that .ts file is generated in the source directoryTor Arne Vestbø2023-04-191-1/+1
| | | | | | | Change-Id: Id738952b6515449ec0c5f7d66e8c89352333d7ad Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit e0a944ff626d0ad210408302355228b2bd46c088) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-1111-11/+11
| | | | | | | | | | | | | | | | | 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: I28dfd6d5540dfe540bab942f9e9a93e9c239e206 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit a3379894bba777d4dcc8dd6ced5149533bb127ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mark Linguist examples with Internationalization categoryKai Köhne2023-03-314-2/+12
| | | | | | | | Fixes: QTBUG-112373 Change-Id: Ia2764196c5dd3f9e001f0585279862efbafa91b1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit ec9dacb2e1c26caa4ae146e6ca30187a1f0e24fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer: Remove worldtimeclock example imagesFriedemann Kleint2023-02-245-0/+0
| | | | | | | | | | | | | Amends 1f859ca1ac6d337aedde2fe8eed74266416ae0d1. As a drive-by, remove the outdated arthurplugin-demo.png. Task-number: QTBUG-110447 Change-Id: Iead32aaca944a886d86dd36465a2082309821be7 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 989241b4149ed4233878102eb51505ad9e1707a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer/QtUiTools examples: Add categoriesFriedemann Kleint2023-02-207-0/+14
| | | | | | | | | | Task-number: QTBUG-110447 Change-Id: If00868910d64168d4f5d7280945985490984762c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e4f952fb82c202b6aec9c7717644eff23ce5bd47) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer/QtUiTools examples: Drop 'Example' from titlesFriedemann Kleint2023-02-206-7/+7
| | | | | | | | | Task-number: QTBUG-110447 Change-Id: Ia9c06560f15dfee58a8a441c3791785827b70913 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 5b3b7c4f85179d63aa901b66d26da3c2f88be3ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix oversights of the Qt Designer Multi examples code changesFriedemann Kleint2023-02-204-32/+30
| | | | | | | | | | | | | | | - Use new string literals - Reorder includes - Use some auto - Minor fixes Amends d1e672c47fd9cfa60f646554db6cba9de08a044f. Fixes: QTBUG-110447 Change-Id: I22c2ee4f2770e2656a6ffad0823ec59f7cf3df23 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 273202689fcddd5ae8af9596f46f03fc5fa6a6fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update screenshots of the Qt Designer examplesFriedemann Kleint2023-02-1625-11/+11
| | | | | | | | | | | | Remove duplicated identical pictures and replace taskmenuextension-example-faded.png by a normal screenshot since it is hard to maintain. Task-number: QTBUG-110447 Change-Id: Iba7ee91dee8fb63af40c1c9b4163d573a1deae5f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 36d620918268f380316b0188f58a2fbcae9a518a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move the uitools multipleinheritance example to calculatorform_miFriedemann Kleint2023-02-1012-23/+22
| | | | | | | | | | | | It illustrates how to use multipleinheritance from Ui struct and widget and is not really related to UiTools. Task-number: QTBUG-110447 Change-Id: If6b61c76ea0ac07b935f1e0a8ee02a2e7179cdc3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit db7a30bd1dca12b04f04a2617d54e22c61e5cf70) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer: Remove worldtimeclock examplesFriedemann Kleint2023-02-0817-850/+5
| | | | | | | | | | | The functionality is sufficiently demonstrated by the existing custom widget plugin examples. Task-number: QTBUG-110447 Change-Id: I09198bba46ebe8da03c9e21192588e6010bec541 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 1f859ca1ac6d337aedde2fe8eed74266416ae0d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Exclude Qt Designer plugin examples from cross-buildsFriedemann Kleint2023-02-071-1/+1
| | | | | | | | | | | For some reason, they cannot be installed into sysroot, Complements 81fdb4dee5083a59dbdb2d01fcb6ab13285be26b. Fixes: QTBUG-110930 Change-Id: Ia6f4d123f7435a1388bb3cfef38daa48120b4891 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 64001fc4c692f317032989c5bdda97527777a171) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer: Document CMake usageFriedemann Kleint2023-02-031-0/+4
| | | | | | | | | Task-number: QTBUG-110447 Change-Id: I8ec8a023d8efc76a7123c56eded528ea31294af0 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit ab37ec05836d9fd2d812c54b463f789c1484f399) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer examples: Add explanation of CMake project filesFriedemann Kleint2023-02-0212-165/+252
| | | | | | | | Task-number: QTBUG-110447 Change-Id: I36769acc50921c2e6af33288b8e291b56328ddc7 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 64fab45f2696a4a54aa07136d6100b47454c488d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer: Fix install of plugin examplesFriedemann Kleint2023-01-314-24/+36
| | | | | | | | Task-number: QTBUG-110447 Change-Id: I1b243a6a564ea18d684a8d5fa8d3310facf81f7d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 81fdb4dee5083a59dbdb2d01fcb6ab13285be26b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Polish the uitools/textfinder exampleFriedemann Kleint2023-01-313-8/+17
| | | | | | | | Task-number: QTBUG-110447 Change-Id: I5d4ae6056b974618c59ef068c92204a24a9c9503 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 8e047fe8cde91454623847ddc1c2abd164d63891) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer/calculatorbuilder example: Remove the form class and its ↵Friedemann Kleint2023-01-306-136/+86
| | | | | | | | | | | | | | | | autoconnected slots The autoconnection feature is considered error-prone and is warned about by clazy. As this removes the need for a class, remove it entirely and use a lambda for the slot. As a drive-by, fix the documentation of the project files. Task-number: QTBUG-110447 Change-Id: Idf78b58445a3f89399f7ae09065f145428ef83fe Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 0e5a54f96dda1ea72fdc43026e3d9bb74886c61e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Qt Designer/calculatorform example: Remove autoconnected slotsFriedemann Kleint2023-01-234-40/+28
| | | | | | | | | | | | The autoconnection feature is considered error-prone and is warned about by clazy. As a drive-by, fix the documentation of the project files. Task-number: QTBUG-110447 Change-Id: I7ba1bf47487abadfeaf02fd573eb01d0519a2ffd Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit d3a36cf82e2b7f64eb2e096a87e589479d8ac1df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Polish the Qt Designer examplesFriedemann Kleint2023-01-2314-73/+72
| | | | | | | | | | | | | | - Use new string literals - Reorder includes - Use some auto - Minor fixes Fixes: QTBUG-110447 Change-Id: I5af23a662dffb3a01795d1f62c573f854e2ee103 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit d1e672c47fd9cfa60f646554db6cba9de08a044f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Remove usage of qtNomakeTools from .pro filesJoerg Bornemann2023-01-182-9/+0
| | | | | | | | | This is a left-over from the qmake-based build system of Qt. Change-Id: If3ac9e7b4d623bd509782a7f01b451ea8502041a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 96f6ea610e2e915248a83feeac4d12c43bfb4c70) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Restructure Linguist examples for claritySze Howe Koh2022-12-234-25/+36
| | | | | | | | | | | | | | | | | The main goal is to show the qmake vs. CMake workflows side-by-side, for easier comparison. Previously, the entire CMake workflow was inserted into the middle of the qmake workflow. Other changes: * Updated the console snippets to work with all CMake generators, not just Makefiles. * Removed a suggestion to manually craft a Makefile. * Fixed a typo. Change-Id: I3c5f3a56957160eddff2f0d6034e37c886966e62 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit e055120820bf3a18387599d2d4e19939255d2a81) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update facts in Qt Linguist examplesSze Howe Koh2022-12-223-14/+8
| | | | | | | | | | | | | * autoexec.bat no longer exists by default since Win XP. * Windows no longer uses the LANG variable for setting display language. * Passing an arbitrary file (that's not a *.pro file) to lupdate requires the deprecated -pro option. Let's not mention it. Change-Id: I7ad3dfc5031e2ea6db33ed88e12b41fd1bb8080a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 729bc77d5880b81637def9e7bb2645022881d8ab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix links to Qt6::LinguistTools CMake commandsKai Köhne2022-12-012-2/+2
| | | | | | | | | The group got renamed to cmake-commands-qtlinguisttools in commit 5566a6d923. Pick-to: 6.2 6.4 Change-Id: I85f6416cbb7b41650f9eaf38aa274eacb05cf884 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Move i18n example to qttoolsKai Köhne2022-11-0725-0/+1238
| | | | | | | | | | | | Move i18n example out of qtbase, into qttools. Improve by - removing hard-coded .qm files and .qrc file. Instead, use CMake / qmake API. - Add target language in .ts files - Make file names match the locale (no->nb, jp->ja) - Using QLocale::uiLanguages() instead of QLocale::system.name() Change-Id: Ie7d496f38dd13078afab76eca3f7cff13ca27b68 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Disable linguist examples if linguist itself is not builtKai Köhne2022-10-241-1/+3
| | | | | | | Pick-to: 6.2 6.4 Fixes: QTBUG-107845 Change-Id: I469a1b12a421c8e4a8b4d0afa66d66e6a2694c58 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-061-1/+1
| | | | | | | | | | | | | | | 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. Task-number: QTBUG-99313 Change-Id: I234704ba429750ddee958a82f6c941d041da0653 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2518-18/+18
| | | | | | Task-number: QTBUG-105718 Change-Id: I2df3a8aec11f30f301e3143e9960156b6f45e614 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-0218-0/+54
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I41a2c9aa6a933a4e3dda5d5b4c70c461912907b2 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1988-3967/+176
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I5335388c0472b0ee554234fc7eca60769e504660 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace uses of deprecated _qs with _sSona Kurazyan2022-04-202-2/+6
| | | | | | Task-number: QTBUG-101408 Change-Id: If6f25418bf3af66ad9bde2dba8bf529b8d202f83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove .prev_CMakeLists.txtKai Köhne2022-03-225-219/+0
| | | | | | | | Amends aeaa9e2a46a3 Pick-to: 6.3 Change-Id: I4ac5d380b72bb0952ddd8ceb55b262e7e8a4fba7 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix build when Help target is not builtAlexandru Croitor2022-03-191-1/+3
| | | | | | | Pick-to: 6.2 6.3 Fixes: QTBUG-101893 Change-Id: Id37064b7fb995c966d3249975fd2e398a6906757 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-02-1921-178/+68
| | | | | | | | | | | | | | | | | | | - Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR, when unnecessary - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: If8bf84b498189fa681cfe5128bc8566026dabec0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Switch examples to build as isolated sub-builds part 2Alexandru Croitor2022-02-051-1/+1
| | | | | | | | | | | | | | | qt_examples_build_begin needs the EXTERNAL_BUILD flag to know that it's safe to build examples as ExternalProjects. It still won't do it in CI until we enable building examples as ExternalProjects for prefix builds. This is preparation for that. Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: I4131ac5b6ea09b8f53752442b8edff8409ebaef7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Switch examples to build as isolated sub-buildsAlexandru Croitor2021-12-155-15/+15
| | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-90820 Change-Id: I5ad7541596d39cb089f9af03b8a194b968659910 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add missing CMake commands in the linguist examplesLucie Gérard2021-11-047-0/+54
| | | | | | | | | | | Also, extend the documentation of the arrowpad and hellotr examples to cover the CMake commands used to produce translations. Fixes: QTBUG-96162 Change-Id: Ib6d6adb32709c34eb0feb8befdf2d8e66a59ca53 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace 0 with nullptrZhang Hao2021-10-181-1/+1
| | | | | | | | We know that c++11 uses nullptr to replace 0, so we replace 0 with nullptr in the project. Change-Id: I52e3b70f58c477414ad8187e3d3cdae25408ecc7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-2215-15/+15
| | | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: I1191a6b4b5c13b2b6047a0e2a2ff8c3801f6762b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Linguist examples: Fix translator loading codeFriedemann Kleint2021-08-302-6/+6
| | | | | | | | Adapt to qtbase/74515a7a30b809a3ab0a2d67496e870ea3c872e6. Pick-to: 6.2 Change-Id: I089970f5e2a7f16ba470aaf4d9e7f1fc9c3e50fd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>