aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* doc: qt_add_qml_module links to qmltc's doc about private headersSami Shalayel2023-10-181-0/+8
| | | | | | | | | | | | Add a note in qt_add_qml_module that qmltc requires private headers in the ENABLE_TYPE_COMPILER section, and link to the part of the documentation of qmltc that explains how to compile QML to C++ using CMake. Fixes: QTBUG-117451 Pick-to: 6.5 6.6 Change-Id: Ie5e6e6c92a10ef4822e5a712bb31e06bdce6bf5e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add missing type warning to qmllint warningsSami Shalayel2023-10-181-6/+219
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: Ib544ea674a1cfc5c6d9b5c9a944cf476cdf51f7d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: document qml toolSemih Yavuz2023-10-161-0/+97
| | | | | Change-Id: Iff0afe38883d68d9bf72bc5e170cf6e17bc4e05f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: document qmlpreviewSemih Yavuz2023-10-162-0/+68
| | | | | Change-Id: I6e526c8a6526a2b3da443c310dab6690db9d9b3f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: document qmlimportscannerSemih Yavuz2023-10-161-0/+5
| | | | | Change-Id: I6bf67681fbdca3460769df255f1caa6d2be0665e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: document qmlformat toolSemih Yavuz2023-10-161-0/+136
| | | | | Change-Id: I14eee55b77137e65626ffa5737ee7f5d85bd5926 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add recursion depth error in qmllint warningsSami Shalayel2023-10-161-7/+34
| | | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: I5816b84c18c22afccc36794ebb2e7de8b1bdf5b9 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add import warnings to qmllint warning listSami Shalayel2023-10-161-7/+154
| | | | | | | | | Add description of all the warnings that comes with the "import" id and for each warning add examples on how to fix them. Change-Id: I258b6aa701180026e196479cdab67974fcbb762c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Document QML_ADDED_IN_VERSION and QML_REMOVED_IN_VERSIONUlf Hermann2023-10-162-8/+50
| | | | | | | | | | | | In turn, deprecate QML_ADDED_IN_MINOR_VERSION and QML_REMOVED_IN_MINOR_VERSION. These are dangerous because you don't quite know what major version they refer to. Pick-to: 6.6 6.5 Fixes: QTBUG-116895 Change-Id: I9d6d169430944e1dfa4e78bda74c8b71f739e331 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Amend code snippets for QML_ELEMENT to show how to expose enumsUlf Hermann2023-10-161-4/+36
| | | | | | | | | | | | | | You can expose enums from either object types or namespaces. The note about namespaces had no snippet at all and the one about object types didn't show what was actually exposed to QML. Also fix the code snippet for qmlRegisterUncreatableMetaObject(). Pick-to: 6.6 6.5 Fixes: QTBUG-113188 Change-Id: I94f8d8f21cb6690689de0cb98f4426daff6e72a2 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: QT_QML_SINGLETON_TYPE has to be before qt_add_qml_moduleUlf Hermann2023-10-163-0/+6
| | | | | | | Fixes: QTBUG-117093 Change-Id: I8949c8d09c381a503b33f4b37f48c899b7502f50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Make docs for QML_{CONSTRUCTIBLE|STRUCTURED}_VALUE visibleUlf Hermann2023-10-161-2/+51
| | | | | | | | | Also, extend them a bit to show how you can as-cast to value types and create lists of value types. Fixes: QTBUG-113490 Change-Id: I03378fa53ab5b76792b3e96d519ca6958132c046 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Improve documentation of Number objectUlf Hermann2023-10-161-6/+19
| | | | | | | | | | Mention that you can customize the locale to gain more control over the output. Pick-to: 6.6 6.5 Fixes: QTBUG-91198 Change-Id: I8dec742fcd7d6675de3580538b86f47e5037f25b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Re-write top-level page about the QtQml moduleUlf Hermann2023-10-132-122/+50
| | | | | | | | | ... also adapt qmltypereference.qdoc so that it doesn't contradict it and provides all the necessary information. Change-Id: I3c640f449ac087b8182ef42b781aca102276fae4 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: add some information on qmlsc modesSemih Yavuz2023-10-131-16/+84
| | | | | | | | | Document direct and static mode for qmlsc, restructure the existing documentation about them. Fixes: QTBUG-111786 Change-Id: Ie159de5f6b5f83bf10ab699836d52119e4475a2c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add an overview page for qml toolingsSemih Yavuz2023-10-1312-2/+113
| | | | | | | | and categorize most common qml tools. Task-number: QTBUG-116660 Change-Id: I505354883086129dbc57ac01489c0df3ad6afdc5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Document how to expose value types with enumerationsUlf Hermann2023-10-132-0/+58
| | | | | | | | | Pick-to: 6.6 6.5 Fixes: QTBUG-108883 Change-Id: I7d3de174cff6a04af4996375500b7dc18e21ef2c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Pierre-Yves Siret <gr3cko@gmail.com> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Describe sequence types and namespacesUlf Hermann2023-10-138-105/+202
| | | | | Change-Id: I2f479a65e8058ee98d42a3f88bfb236648aa7583 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Clean up the language reference documentationOlivier De Cannière2023-10-135-223/+264
| | | | | | | | | | | | -Add a missing entry for dynamic object creation -Move pragmas from "Defining Object Types through QML Documents" to "Description of the structure of QML documents" and add a missing entry for NativeMethodBehavior -Add a missing link to the "Configuring the JavaScript engine" page -Update the import statements in "QML Syntax Basics" Change-Id: I293488b04e2636fca4a2f52741ed270e96c4d656 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add deprecation warning in qmllint warningsSami Shalayel2023-10-131-12/+9
| | | | | | | | Add description of the warning. Task-number: QTBUG-111137 Change-Id: I4230d22280569657110f31d71c9e46dd4c9f69a9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add inheritance cycle warning in qmllint warningsSami Shalayel2023-10-131-6/+26
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: Ic8b39b9c4540f7865cb2700012b8d9dc9d446719 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add with-statement warning in qmllint warningsSami Shalayel2023-10-131-6/+30
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: I2e31c011198c1bd9a38d0d4315d95f9dbfb4c74a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add unresolved alias in qmllint warningsSami Shalayel2023-10-131-7/+31
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: If0c309124b74184f0fdec995fa7eeb68b104cb30 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add unqualified access to qmllint warningsSami Shalayel2023-10-131-7/+33
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: I5dabe23486bca5a2bcd85ecf94feed4861fc301d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: add required properties to qmllint warningsSami Shalayel2023-10-131-7/+46
| | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-111137 Change-Id: Id3d6fe44882df292f4ebc864c348ab3bca8ab33b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: list qmllint warnings and errorsSami Shalayel2023-10-1337-0/+945
| | | | | | | | | | | | | | Add a page to list the warnings and errors of qmllint, and create stub files with a template for each warning and error. TODO (in later commits): * process the TODOs in the stub files * link to this page from qmlls/qmllint/qml compiler doc pages (requires QTBUG-116660 first) Task-number: QTBUG-111137 Change-Id: Iec431a6956a4cba582391d444517155dd77d982a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Sprinkle docs about context properties with warnings and notesUlf Hermann2023-10-122-11/+43
| | | | | | | | | | | | | | | We don't want people to use context properties. Warn about their effects and offer singletons and object properties as alternatives. Also, suggest object properties instead of context properties in the page about exposing C++ attributes. Pick-to: 6.6 6.5 Fixes: QTBUG-113785 Change-Id: Id3fb6c7f26383838baeef2e696f8b1848b4e6fc6 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Move qmllint and qmlls docs out of qtquick folderSemih Yavuz2023-10-123-0/+286
| | | | | | | | | | | | The documentation for QML tools should live in qml/doc. As todo for next commit: Introduce qmltooling overview page and exhibit qml tools in categories like developer-tools, designer-tools, internal-tools etc. Task-number: QTBUG-116660 Change-Id: Ide3b0a306e34dd6c1466dfdfa836d073caf1c884 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: Document connections lifetime subtletiesOlivier De Cannière2023-10-121-1/+62
| | | | | | | | | | Connections to functions remain alive even after the context in which the functions were created is destroyed. This is to be expected from the lifetime rules in js but may be somewhat surprising to some. Fixes: QTBUG-114194 Change-Id: Ie65e9f7aa729aa7426eea62324acaed55dccbd90 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: Warn about mixing of implicit/explicit assignment to default propsOlivier De Cannière2023-10-091-0/+12
| | | | | | | | | | | | | | | Assigning objects to default list properties like children for Items can be done implicitly by defining objects inside the item, or explicitly by assigning the property directly with an array. Mixing the two solutions leads to undefined ordering of the objects. Additionally, the behavior differs between the interpreter and the compiler. Warn about these issues and signal that both methods must not be mixed within a single element's definition. Fixes: QTBUG-102468 Change-Id: Ib9c467358d34105183ef4e20f8b28c687b6db8c5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Simplify QML singleton type registrationUlf Hermann2023-09-281-11/+2
| | | | | | | | | | | | We don't really care what kind of factory function you stick in there as long as we can convert it to the relevant std::function. This makes all of the registration functions templates. Templates are only instantiated when used. Therefore we get faster compilation times. Change-Id: Ib825657cb6e5bd82b23af3f8b384985029c306ca Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix documentation of FunctionSignatureBehaviorUlf Hermann2023-09-192-37/+27
| | | | | | | We enforce function signatures by default these days. Change-Id: Ifd441d79b4cde9c522bba93ce88dfa44663e7e9b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix undocumented parameters and broken linksTopi Reinio2023-09-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/qml/jsapi/qjsengine.cpp: (qdoc) warning: Can't link to 'qvariant_cast()' * src/quick/items/qquickrhiitem.cpp: (qdoc) warning: Undocumented parameter 'item' in QQuickRhiItemRenderer::synchronize() (qdoc) warning: Can't link to 'msaaColorBuffer()' (qdoc) warning: Can't link to 'resolveTexture()' * src/quick/scenegraph/util/qsgtextnode.cpp: (qdoc) warning: No such enum item 'Text.NativeRendering' in QSGTextNode::RenderType (qdoc) warning: Undocumented parameter 'color' in QSGTextNode::setColor() (qdoc) warning: Undocumented parameter 'color' in QSGTextNode::setSelectionColor() (qdoc) warning: Undocumented parameter 'viewport' in QSGTextNode::setViewport() * examples/quick/rendercontrol/rendercontrol_rhi/doc/src/ rendercontrol_rhi.qdoc: (qdoc) warning: Can't link to 'QWidget-based' (qdoc) warning: Can't link to 'QAnimationDriver' Mark all documentation modules in qtdeclarative as free of warnings. Change-Id: I97cc059701c351b53cdeeb5fc2feff923c5a76a8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings in Qt Qml and Quick docsTopi Reinio2023-09-152-4/+5
| | | | | | | | | | | | | | | | | | | | | | | * src/qml/doc/src/qmlfunctions.qdoc:451: (qdoc) warning: Can't link to 'Extension Objects' * src/qml/doc/src/cppintegration/topic.qdoc:4: (qdoc) warning: Can't link to 'qtqml-cpp-integration-exposecppstate.html * src/quicktemplates/qquickpane.cpp:14: (qdoc) warning: Can't link to 'wheelEnabled' * src/quick/scenegraph/util/qsgtextnode.cpp:96: (qdoc) warning: clang couldn't find function when parsing \fn QSGTextNode::TextStyle QSGTextNode::textStyle() const * src/quick/items/qquicklistview.cpp:2020: (qdoc) warning: Can't link to 'ListView::cacheBuffer.' Pick-to: 6.6 6.5 Change-Id: I0d6f88239bb02ea2d012c998542dddc60f6d4ce3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix typos in FunctionSignatureBehavior documentationGiuseppe D'Angelo2023-09-131-2/+2
| | | | | | | | | The parameters of the pragma have a trailing `d` that was missing from their names. Pick-to: 6.5 6.6 Change-Id: I9810e1a7141ac7edd20d233d2049f84d6749be79 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: All overviews list categorizationJaishree Vyas2023-09-112-2/+2
| | | | | | | | | | | | The \generate list names are added for each categorized section with some explanation. Here, calling the overviews as explanations-(name of the section). The idea is to give general terms instead of specific phrases like 'core' etc, for better understanding. Task-number: QTBUG-115347 Pick-to: 6.5 6.6 Change-Id: Ib33b450aa0919b0fd3e7a265cd2843af6c7d019c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix broken linkAndreas Eliasson2023-08-311-1/+1
| | | | | | | | | | This fix resolves the following qdoc warning: (qdoc) warning: Can't link to 'Limitations when compiling JavaScript' Pick-to: 6.6 6.5 Change-Id: I76a3cb6188719bd7a893b4744a23c49a0e632015 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Point out that STATIC QML plugins require direct linkingAlexey Edelev2023-08-241-1/+5
| | | | | | | | | | | | In qt_add_qml_module documentation we never mention targets using the STATIC QML plugins need to link to corresponding QML plugins. Add couple words in addition to the Q_IMPORT_QML_PLUGIN note. Pick-to: 6.6 6.5 Task-number: QTBUG-114688 Change-Id: I2e484250ea9d06dc8824aea23a7c4c106f01884f Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: add option to generate .qmlls.ini filesSami Shalayel2023-08-231-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a CMake bool variable QT_QML_GENERATE_QMLLS_INI to indicate to qt_add_qml_module that .qmlls.ini files have to be generated for each directory where qt_add_qml_module is invoked. The .qmlls.ini files are generated in the source directory. This option needs to be set explicitly by the user, either as normal or as cache variable. The .qmlls.ini files are required for qmlls to work properly in any editor, without needing custom qmlls-client implementations for every client that passes the build folder on to qmlls. Each source directory with a CMakeLists.txt that does the qt_add_qml_module command gets a .qmlls.ini that contains all the build folders of all qt_add_qml_module-commands of the current source directory. This mimics how qmlls searches for the .qmlls.ini (starting at the source file directory and going up until it finds a .qmlls.ini), and avoids having to save a map from source folders to build folders in the .ini file. Warn the user when using CMake versions <= 3.19: QT_QML_GENERATE_QMLLS_INI requires deferring the calls to write the .qmlls.ini files to make sure that all build paths of all qt_add_qml_module calls of the current directory can be written inside the .qmlls.ini file. For multi-config build, this just makes use of the last generated config and overwrites the .qmlls.ini files for the other files. This is similar to what CMake does for compile_commands.json on the ninja multi-config generator, see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7477 for example. Added some documentation about the option, and also a test. Fixes: QTBUG-115225 Task-number: QTCREATORBUG-29419 Task-number: QTCREATORBUG-29407 Change-Id: I4a463ff7af534de266359176188fb016d48cf2c4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: link to best practices from Interacting with QML Objects from C++Mitch Curtis2023-08-231-1/+2
| | | | | | | | | There's already a warning in that section, but we can also link to the best practices page. Pick-to: 6.2 6.5 6.6 Change-Id: I31fcab885e7b95bac907605a038408c3019d297a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Explain how DEPENDENCIES helps with type resolutionUlf Hermann2023-08-221-0/+8
| | | | | | | | | Pick-to: 6.5 6.6 Fixes: QTBUG-110821 Change-Id: I506c7781d1b6b4d4c3b741e779702d184d442faf Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Doc: List QtQml value types separate from QtQuick value typesUlf Hermann2023-08-222-4/+5
| | | | | | | | | | You don't need to import QtQuick for rect, size, and point. Pick-to: 6.5 6.6 Task-number: QTBUG-110821 Change-Id: I1f998a5f5b07b7f373e5c0ce3f7aff3b9983ccd7 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Compiler: Separate function prolog block and add validation of blocksOlivier De Cannière2023-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function prolog logic is now separated in its own basic block. The first "real" block with user code starts at offset 0. Having the function prolog as a hidden part of the first block caused some inconsistencies in block generation and would create empty blocks. This happened for example when a back edge of a loop would target offset 0 in code where a loop condition is the very first set of instructions that are run. This is because the target block offset didn't exist due to it being part of the hidden prolog block. Validation for the basic blocks was also added. This checks for three things at the moment: 1. That return and throw blocks don't have jump targets. 2. That the basic blocks graph is connected. 3. That jump targets are the first offset of a block. Test tst_QmlCppCodegen::basicBlocksWithBackJump_infinite() is expected to fail because it contains an infinite loop and the basic blocks that are generated for it are inconsistent due to dead-code elimination happening earlier in compilation. Debug outputs for dumping basic blocks were also adapted to reflect these changes. Change-Id: I513f73856412d488d443c2b47a052b0023d45496 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Fix typo in qt_deploy_qml_imports exampleAndy Shaw2023-07-251-1/+1
| | | | | | | Pick-to: 6.6 6.5 Change-Id: I52869a202169d7cc4bcf5337bcd61b10a68915de Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Add example category for Qt Qml examplesVenugopal Shivashankar2023-07-212-2/+2
| | | | | | | | | | Also, removed the \example command for a couple QML tutorial pages. Task-number: QTBUG-115226 Pick-to: 6.5 6.6 Change-Id: Ia3b988d369402b59c1a191fae12a5e8119ecbcab Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: List of all Qt overviews which are now termed as explanationJaishree Vyas2023-07-192-0/+2
| | | | | | | | | | | | | The autogenerated list of overviews was adding the \group command which included all the groups instead of overviews. The idea here is to categorize the overviews later on once we have the list of all overviews. Task-number: QTBUG-114762 Pick-to: 6.5 6.6 Change-Id: I6e09a15bf991a2b6f152f037814ea1910ba7d83f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Use \qtpolicydeprecatedbehavior in doc for the deprecated behaviorAmir Masoud Abdol2023-07-181-2/+1
| | | | | | | Pick-to: 6.6 Change-Id: Ibbf9df039f384dc27a4de8102c3699b17519d457 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Fix typo in qt_add_qml_module() descriptionKai Köhne2023-07-111-1/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ic55b011704281d8334fff868e0c651d867e9f6ad Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Compiler: Allow dumping the basic blocks for visualization and debuggingOlivier De Cannière2023-07-101-0/+8
| | | | | | | | | | | | | | | | | | | | If the QV4_DUMP_BASIC_BLOCKS environment variable is set, the compiler will output the details of the basic blocks of the compiled functions to the console. It will also generate a control flow graph containing the byte code in DOT format for easier visualization and debugging of the program execution and of the structure of the generated code. The value of QV4_DUMP_BASIC_BLOCKS will be used as the path to the folder in which to output the DOT files. If the path is any of ["-", "1", "true"] or if files can't be opened, it will be dumped to stdout instead. The logic in dumpByteCode has been adapted to use a QTextStream. This way it can continue to be used to dump the byte code of the whole program as before and also to construct the CFG. Change-Id: If398d795e4fc0950b5fa8ee1349e80b1ae262deb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Remove unused snippet fileKai Köhne2023-06-301-24/+0
| | | | | Change-Id: Icdb5f01e9f3180fb398c100ba763b9a0ce8be2a1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>