aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Use tabs instead of a table that has code snippets6.3Andreas Eliasson2022-12-281-22/+31
| | | | | | | | | | | | | | Using a table with code snippets in different columns will cause the table to expand outside of the page width, forcing the user to scroll horizontally. In addition, in mobile view, the table with code snippets messes up the entire width of the page. Fixes: QTBUG-104156 Change-Id: I36341a5da162cd88961ee1f8741b166b167f8770 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit b6d3f84c2a2bd7bed7a85618a30e05925bc2b6c0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlEngineExtensionPlugin: Mention that CMake API is generally fineFabian Kosmale2022-09-071-0/+8
| | | | | | | | | | | | | | With qt_add_qml_module, the generated plugin will be sufficiant most of the time. Mention that this is the case, and also mention NO_GENERATE_PVUGIN_SOURCE for the case where customization is required (most likely to occur with image providers). Fixes: QTBUG-106270 Change-Id: I7e9399f9617e7d531b84b68afc9e8f9aa85f0704 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 2ca9d70c17e790f55f9b09088e1c3bca77488560) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Document behavior of remote implicit importsUlf Hermann2022-08-292-2/+11
| | | | | | | | | | | | They are remote directory imports for all practical purposes. Therefore, you need to add qmldir files to make them work. Fixes: QTBUG-92068 Change-Id: I7b11e55e53b2c96d95619ac2346cd45561e73b9a Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a22bd4164e10fd2e208d0fa6e3373c8e27996952) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Split qmldir entries table into subsectionsAndreas Eliasson2022-08-121-268/+277
| | | | | | | | | | | | | | | | | | | There are two main problems with the existing table: * The user has to scroll horizontally to view all the content in the right column. * It is difficult to link to the individual entries. Splitting the column into subsections solves these issues. In addition, add a list of all the commands in the qmldir file to get a quick overview of the subsections that follow. Also, make small grammatical fixes to the text. Fixes: QTBUG-105239 Change-Id: Ic33caedf317ae1d33ecc606cffc5d664490e242c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2bd4ee37ff1393cc5483bc6f4020276f1c0317c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: link to QML module examples from qt_add_qml_module pageMitch Curtis2022-08-121-0/+3
| | | | | | | | | | | | Users need code they can copy, and qt_add_qml_module lacks examples of e.g. main.cpp and its position within the recommended directory structure. Change-Id: I29212b603bfd9cf24ecb327317be8f1410b2cfda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit f2c87dda912eeb936259485051ef104a19c617b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Host environment doc: Improve chances to find ?. and ??Fabian Kosmale2022-07-271-1/+2
| | | | | | | | Change-Id: If00363ef80d38c1fc61aadc0f77dba90867d2768 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit e6e19d50a38806c8c1932c8b48a77ff0ba574db0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: fix links for ways to initialize required propertiesTasuku Suzuki2022-07-211-2/+2
| | | | | | | | | | | https://doc.qt.io/qt-6/qtqml-syntax-objectattributes.html#required- properties Change-Id: I649a0335ee8555e081376ef51b20ad260529b493 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9e03741e54768f99dac166bd56b0e8cb6d85ca36) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mention Q_IMPORT_QML_PLUGIN in qt_add_qml_module docsFabian Kosmale2022-07-211-0/+4
| | | | | | | | | To increase the chance of finding it. Change-Id: Id71267e887d3799d8dc50858942d1c37557a8b82 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 610f10b74b186559355725acc132225eba7b97a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove sentence about extensions only providing propertiesUlf Hermann2022-06-301-4/+3
| | | | | | | | | | | That's a leftover from QtQuick 1. Fixes: QTBUG-104603 Change-Id: Iefefc9830c4f3cc3bbffa6fab4662ffcf6c75088 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Robert Griebl <robert.griebl@qt.io> (cherry picked from commit a11c34e908d59708326ee8e0942a8d5b5147e387) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Clarify naming conventions for .js files in QML modulesJoerg Bornemann2022-06-221-0/+11
| | | | | | | | Fixes: QTBUG-100644 Change-Id: Iadb9d125e6de214584ab7983883d61e311a8f223 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 428c7e9129121097fe18ea79e93ecb13fd773e85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update external page linkingTopi Reinio2022-06-201-26/+13
| | | | | | | | | | | | | | * Remove obsolete, unused \externalpage links. * Update remaining ones to use https. * Update titles of external pages to be more specific. This avoids incorrect linking when there are multiple conflicting titles. * Remove excessive linking on qtquick-toolsnutilities.qdoc. Fixes: QTBUG-104138 Change-Id: I4efb79a938d84c109db9db2bf5182b324e9940aa Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 1c0f3cc4d9080ff51bb8a8adbdae1a61fe34871f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Take care of QVariant when converting function argumentsUlf Hermann2022-06-161-3/+3
| | | | | | | | | | | | | | | | We cannot convert to QVariant using QMetaType::convert(). But we can just construct a QVariant with the desired type and data. This will become an issue once we automatically convert argument types to match the desired type inside the function. As a side effect, also allow declaring "var" arguments to functions. Fixes: QTBUG-104361 Change-Id: Idc14021d8d85d3d09ee7b7f286de91b56ea02bfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c8e756e560ce3f0d369df65986e5578e0e963c66) Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Doc: Describe Qt Quick Compiler TechnologyJaishree Vyas2022-06-084-0/+103
| | | | | | | | | | | Details: Overview of Qt Quick compiler components, document on qmlsc. Task-number: QTBUG-103031 Change-Id: I713b4a27d322745a62653f6895e7bbf44907d55a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8adf334c3435d03c082df087ec0218e226b41040) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add CMake documentation to 'Extending QML' exampleAndreas Eliasson2022-05-111-14/+55
| | | | | | | | | Fixes: QTBUG-102085 Change-Id: I8f79a00b9ef827f229a94bc840b1951c8f67e4a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit d4c8f0b95bec719738aee6ab943914fc62f5aace) Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Integrate with JS Values from C++Jaishree Vyas2022-05-105-0/+388
| | | | | | | | | | Based on a Blog post Task-number: QTBUG-93490 Change-Id: I7980e9790af3ceea58d73d043f868ad5c62c5a89 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit f57747e54180667c26fedc982861caf66d03593a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add CMake sections to 'Creating C++ Plugins for QML' pageAndreas Eliasson2022-05-072-32/+55
| | | | | | | | | | | | | - Revise grammar - Fix so that example project can be built from the command line using CMake - Add tabs on example page Task-number: QTBUG-102330 Change-Id: Ic6bdcadec66850f5e811dcaac23a8cb59a6c3f94 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit a12db0dfc942e2cde9994160f339678a8a7d5924) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Improve cross-linking between QML and integration articlesAndreas Eliasson2022-04-168-7/+36
| | | | | | | | | | | | | Also, separate articles and examples into two lists in the qml module landing page, and replace some of the links to the 'simple c++ integration example' to the more detailed 'Writing QML Extensions with C++' tutorial. Fixes: QTBUG-102116 Change-Id: Id3cc9de35c1cec6e53caa5cc1feff1f55ff4b084 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0dc9cb059b66d93d6b1097bcf1a662e662586f6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Write QML ModulesJaishree Vyas2022-04-017-0/+366
| | | | | | | | | | | Based on a Blog post Task-number: QTBUG-100450 Change-Id: I42ade9906e8ba5ebeb1e78cfe3343ac9d89dcada Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 88bd1a9a1f94d02ff7e61101574db75feadade9c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Revise Qt QML module landing pageAndreas Eliasson2022-03-141-63/+60
| | | | | | | | Task-number: QTBUG-100369 Change-Id: I119a74c58fa1b6f310907d4275a08c9f8f3d0cf8 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 4015665bbd1e0f9d5af5dc6618275f1170b55bec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable failing declarative tests on Android - Part 2Assam Boudjelthia2022-03-021-0/+3
| | | | | | | | | | | | | | | | | This allows us to enable testing on declarative for the module as a whole and have some sort of test verification for the mean time, and fix the fails over time. This also disable tests like qdom and qjsscope which are host tests. Task-number: QTBUG-100991 Task-number: QTBUG-99194 Task-number: QTBUG-101005 Task-number: QTBUG-101006 Change-Id: Ie7ae5b8e0ccdf2f55ce3568091d513a073c48417 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 6c3373109fedf45b06c9c48355a80922fd754b31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Clean up deployment docs for 6.3Alexandru Croitor2022-03-023-4/+22
| | | | | | | | | | | | | | | Add 6.3 version requirement to doc snippets that use the deployment api. Update the qt_deploy_qml_import doc snippet to show case usage of all the options provided by the function. Fixes: QTBUG-100926 Change-Id: I81abef21cf7b8bfdd09fc53c7b7dacba994bd78c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 6d0307b443c5f6e40a820e3cfc8c28fc6e5f77de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qmltc_examples: Fix a documentation leftover (FILES -> QML_FILES)Andrei Golubev2022-02-211-2/+2
| | | | | | | | | Amends 97123dbe6755a787e93797f717f8ebf193352b85 Change-Id: I0f13df4abff4ba2f0bb066480a157f6cfbefa3c2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bd968fa6ff07cda5d96dd5c9851bb1c98ee4f318) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove cmake-variables qdoc groupKai Köhne2022-02-181-1/+0
| | | | | | | | | The group is not used anymore. Change-Id: Ieebee205f10e5b96ed7cdc1a45b6a7d34d35fa26 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 30687a3c338ba316b7171bf8cea0d94beb6c482b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qmltc_examples: Set visible text to 0 by defaultAndrei Golubev2022-02-161-0/+1
| | | | | | | | | This gives slightly nicer initial UI as a result Change-Id: I112ed029d3735b7c960b7723d2aef0b6fc8e1777 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f6b039681a3060098cadc57cd64fbf7d9705b6ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix docs and implementation of qt_generate_foreign_qml_typesAlexandru Croitor2022-02-163-9/+27
| | | | | | | | | | | | | | | | | | | | | | | Renamed doc file not to contain the version number like the rest of the doc files. Clarified description of what the function does. Adjusted doc page title and contents of the function. Fixed synopsis. Added Technical Preview note. Renamed function arguments for clarity. Fixed incorrect COMMENT and DEPENDS target usage. Added mention to QmlIntegration and qt_generate_foreign_qml_types on the Qml module page. Amends 96c1337aef41694c1af4863ad6f0d4d1f961363a Amends 3b1ae2f598d6013e5d262262002820d6eb76805b Fixes: QTBUG-100216 Change-Id: I5c48616a7836c4ddb3f5ca36b7e82f1364995f2f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9e03505902ee7bda802f18ad1a34d36f96838985) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Document source file propertiesAlexandru Croitor2022-02-161-0/+187
| | | | | | | | | Task-number: QTBUG-100224 Change-Id: I548e0317f148cdedafd553a3591526c40b9b3a32 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d280b41a096c470bcdc573fb8268aa128e0b7c3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Error out when using CMake < 3.19 with qml app deploymentAlexandru Croitor2022-02-153-0/+8
| | | | | | | | | | | | | | | | | | | App qml deployment fails at install time when using CMake < 3.19 because the _qt_internal_generate_deploy_qml_imports_script finalizer is not executed. It is not executed because the Qml dependency is added later than qt_add_executable, and qt_add_executable immediately finalizes with a lower CMake version. We can detect this situation and issue a warning to the user that they should manually finalize their target in that case. Adjust documentation to mention that. Task-number: QTBUG-98545 Change-Id: I862b2fad35c8128dbb043cea972c8e36958308f4 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 0d276381135ed5724464cb784f3d17775ac4d764) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix incorrect option passed to qt_deploy_qml_imports in docsAlexandru Croitor2022-02-121-3/+1
| | | | | | | | | | | It was copy-pasted from the example doc snippet for qt_deploy_runtime_dependencies. The actual option is TARGET, not EXECUTABLE. Change-Id: I91fb2fdf069588c4a81e00db5f65fe19150fe8b6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 0605069fae85f95b3847ce1aeefb43bef1b9cd1b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: State Qt versions for when CMake commands etc. were introducedJoerg Bornemann2022-02-125-0/+8
| | | | | | | | Task-number: QTBUG-100212 Change-Id: Iaba78e26d9dcaf85e6089639ef95385ad36891f5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 0a28ee11e398ac8947cf6e5699bddc65769e91de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve the structure of the output generated by qmltcAndrei Golubev2022-01-311-1/+1
| | | | | | | | | | | | | | | Make an effort to separate user-visible APIs from internal code relevant to qmltc In the process of doing it, make tst_qmltc_examples::helloWorld() test less brittle by using QMap instead of QHash when dumping C++ member functions of the type. QHash does not guarantee that the keys are ordered while QMap does (via operator "<") Change-Id: I1495e1755d3fd77950acb3820ad2b9c5e3cdee33 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 0ad51325c7432c8a8da38580d26721455252e64f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document qmltc output formatAndrei Golubev2022-01-276-23/+323
| | | | | | | | | | | | Make understanding qmltc output easier by showing how it works on a trivial example. Add a paragraph on the generated code location as an addition Fixes: QTBUG-100051 Change-Id: I0fa0f2c6c60fef7accbe855159275591d9e8bbc6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8ec6b990e13c8b41d0415af83c5890ef7a9ee227)
* qmltc: Rename CMake command's argument FILES -> QML_FILESAndrei Golubev2022-01-272-7/+7
| | | | | | | | | | This way we make it consistent with qt_add_qml_module() Fixes: QTBUG-100214 Change-Id: I9f38a8ba3dec978ccdf4ea937ff662ae2449e582 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 97123dbe6755a787e93797f717f8ebf193352b85) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adjust default max call depth for QNXUlf Hermann2022-01-261-3/+6
| | | | | | | | | | | QNX by default has smaller stacks than other platforms. Change-Id: Ia83d4e12c0fd24c51069777db2283d456c49800f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> (cherry picked from commit 7680fc7beed9c9f8e3883ac1796ef332cf40a4c8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: State that you should type-annotate methodsUlf Hermann2022-01-251-7/+21
| | | | | | | Change-Id: I0c4d6e7d69e15d56e9af36a4fee11c40959946f2 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit c0179382063f3b408891edaa40b4def09546d64c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document qmltc toolAndrei Golubev2022-01-199-0/+866
| | | | | | | | | | | | | | | Add initial qmltc tool documentation with introduction, compilation process picture, description and limitations To simplify the description, we can consider some simple application. The same app can additionally become a test scenario for qmltc and a showcase of its capabilities Task-number: QTBUG-84368 Change-Id: If6d586a8c68f48d17133b25170d0fff627e2066c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit de30f10aeb1ccf495cf39b3910e89d60f3dc591a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Enable zero warning limit for documentationVenugopal Shivashankar2022-01-161-0/+3
| | | | | | | | Fixes: QTBUG-98116 Change-Id: I3d0a2ede380fd60bbe9c4e2852c4da3b737180ec Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 37213acd75729a0945145864135709bddde88a85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Adjust regular expression for suppressing warningsTopi Reinio2022-01-061-0/+3
| | | | | | | | | | | | Make the regular expression capture also future uses of \instantiates, and escape the '+' characters when matching the string 'C++'. Task-number: QTBUG-98116 Change-Id: Ifecfff540aff28f5fe116240a064a74ea80d09bf Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit ea062064f753cd9bf8498a2aef8e44f9061aea0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2022-01-061-1/+1
| | | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Task-number: QTBUG-98867 Change-Id: I021c8f0c7f886d8f7037a1dd92ef1e8d747a45f4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit ad69aca9a6c2fdcc12bd6ecd55d2e417d1af6335) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing documentation for qmltc cmake commandAndrei Golubev2021-12-241-0/+5
| | | | | | | | | | The option got silently introduced, undocumented Change-Id: Iebaf38c8f96e5a5d3ba96863f28efe5180718c33 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit 777b56942bc8a9d4ae9489d535070cce4f0a5998) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation for qt_query_qml_module()Craig Scott2021-12-132-0/+242
| | | | | | | | | Task-number: QTBUG-95024 Change-Id: I1243af7804b1206383dfd99e1507e4c2195087f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 9f8b118bd1ae609020f80948fbd50c3a71a3956e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation for CMake deployment support for QML module appsCraig Scott2021-12-135-6/+298
| | | | | | | | | Task-number: QTBUG-98545 Change-Id: I3147f6fa324de203a8bb22d9ec95f10930b0a2bb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit b16619cbf721a30c704d9ff4390f4cb64d9dd242) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: fix JavaScript engine's name and linkTasuku Suzuki2021-12-101-2/+2
| | | | | | | | The items listed in the documentation are provided by QJSEngine. QQmlEngine provides the Qt object, locale, network, database additionally. Change-Id: I6c35f441a0ce5102ff640f05443a18c10d19f404 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix documentation warningsTopi Reinio2021-12-061-1/+1
| | | | | | | | Fix warnings related to the introduction of the TreeView QML type, as well as other minor issues. Change-Id: Icdcb61b4de0144ca426b1ab5a17ddc0ddc523773 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Compile QML files ahead of time with qmlcachegenUlf Hermann2021-12-031-0/+10
| | | | | | | | | | | | | | | | | | | | | qmlcachegen compiles bindings and functions to C++ as far as QQmlJSAotCompiler can. It does respect "pragma Strict" and rejects the file if it's violated. Furthermore, it sets up the logger to follow the qt.qml.compiler.aot logging category. By default it's completely silent. Compiling the examples with qmlcachegen exposes a bug in the type resolver where it returns an invalid generic type. It should never do that. Fix it by returning JSValue. [ChangeLog][QtQml][Important Behavior Changes] QML bindings and functions are now compiled to C++ by qmlcachegen, if possible. Use the qt.qml.compiler.aot logging category to receive diagnostics about the compilation. Task-number: QTBUG-98305 Change-Id: I6953812c3fd20b68339617a5714fcbe16a384360 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Add a section about singleton types in qt_add_qml_moduleAlexandru Croitor2021-12-034-0/+81
| | | | | | | | | | | | | | QT_QML_SINGLETON_TYPE was only documented on the qt_target_qml_sources page. Add a short section about singletons to the qt_add_qml_module page and reference the other page. Adjust the example in qt_target_qml_sources to show case how to set the singleton source property. Pick-to: 6.2 Fixes: QTBUG-97541 Change-Id: I11aa3cb7c0feb748eba1d7ac9ef81a8ac6cb16b1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Drop version no. against the \qmlmoduleVenugopal Shivashankar2021-12-021-1/+1
| | | | | | | | | | | | Since Qt 6.x, it is not mandatory to have version no. against the module import statements. Pick-to: 6.2 6.2.2 Task-number: QTBUG-98481 Change-Id: Ia3d35f2dc198d3e9c02d15784ca07c9bbb9526ce Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add documentation for qt6_generate_foreign_qml_typesFabian Kosmale2021-12-021-0/+89
| | | | | | | | Task-number: QTBUG-92258 Change-Id: Ib6414f98b19d86119891ade788d47370c28a4a6c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Replace use of \oldcode-\newcodeLuca Di Sera2021-11-251-16/+75
| | | | | | | | | | | The command-pair was recently deprecated. The replacement code should produce an output that is equal to the previous one. Task-number: QTBUG-98499 Change-Id: I249427c1ddf28db33befdc4b6af614377af425d1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qmltc: support user-specified namespaces in the generated codeAndrei Golubev2021-11-161-0/+5
| | | | | | | | | | | | | | | Already during the prototyping phase, conflicts in class names were encountered within Qt code base. Those could be avoided by namespaces. Initial qmltc logic was using meaningless "q_qmltc" namespace, so let's improve that by allowing user-specified namespaces + making Qt's own QML files (compiled to C++) being available under QT_NAMESPACE. The latter is achieved by providing (and using) the internal version of a qmltc-invoking function Task-number: QTBUG-84368 Task-number: QTBUG-96040 Change-Id: I99cdf1baba8838c093b6b469f6744869f72af093 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qt6_target_compile_qml_to_cpp: improve QT_QMLTC_FILE_BASENAME handlingAndrei Golubev2021-11-091-3/+4
| | | | | | | | | | | | | | | | | Let's simplify the whole output path logic for .cpp and .h: - there's really little use in relative prefixes (e.g. we don't need data/ in data/HelloWorld.qml to operate) - similarly, let's ignore/discourage the use of such prefixes in QT_QMLTC_FILE_BASENAME. I envision poor output dir structure otherwise (not that anyone will notice it anyway) As a drive by, also replace CMAKE_CURRENT_*_DIR with target_*_dir as we should really use target's dir structure, not the (potentially wrong) current dir structure Task-number: QTBUG-96040 Change-Id: Ib9a108941e5179809855d28003ec157a07163c0e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>