aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
...
* QtQml: Augment the "is not a type" warning for unspecialized listsOlivier De Cannière2025-10-201-0/+7
| | | | | | Pick-to: 6.10 6.8 Change-Id: I3ed1a4719f64e1c4eae7013ce398d41ba25ecc5f Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Fix coverity warningUlf Hermann2025-10-201-2/+3
| | | | | | | | | We don't need to store the scheme/host part of the origin in a temporary. The whole string can be constructed in one go. Coverity-Id: 896383 Change-Id: I1978ea26d3946c8f905f76d18192c5f1ced1e647 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Unify messages about cyclic aliasesUlf Hermann2025-10-141-1/+1
| | | | | | | | There were two different error messages that mean the same thing. Change-Id: I656333ab089f345580e31d63cd8ce7412b223d04 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Store QUrl as-is in QV4::UrlObjectUlf Hermann2025-10-142-247/+160
| | | | | | | | | | All the conversion back and forth only adds noise and overhead. Use an array of std::byte to trick the memory manager into believing that QV4::Heap::UrlObject is still trivial. Task-number: QTBUG-138545 Change-Id: Ic382741d441cfb8a7446d6c46ded77173325ce34 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* IRBuilder: Drop pointless visit overridesOlivier De Cannière2025-10-142-36/+0
| | | | | | | | Overriding the function only to then call the base implementation and nothing else is not very productive. Change-Id: Ib3cba0d38de652c94689b0bac5e878f629e35bd3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Extending QML: Clarify the need for qmldir files with qmake/cmakeOlivier De Cannière2025-10-141-1/+9
| | | | | | | | | | The fact that a qmlfir file needs to be written manually when using qmake was not really mentioned before. Pick-to: 6.10 6.8 6.5 Change-Id: I174ade01d5e8bd28626939f7257717070c4d220f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* XmlHttpRequest: Don't treat content-related errors as network errorsMårten Nordheim2025-10-141-0/+2
| | | | | | | | | | | | | By not testing for these extra errors they get treated as if the request itself was a failure, rather than the server returning an error as a perfectly valid response. Amends 1faca908dddb90824d94bed6a1561f4f192328d3. Pick-to: 6.10 6.8 Fixes: QTBUG-141063 Change-Id: I3c7aee696ada58de8f1c2dcf7d4c941e644c6ab1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: fix qmltypes description: its QML, not JSONSami Shalayel2025-10-131-1/+1
| | | | | | | | | | Fix the description: qmltypes files are made out of QML, not JSON. Pick-to: 6.10 6.8 Change-Id: I42df0adb06ffebc4e58f12db280dc496e1c69c38 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* qqmlpluginimporter: remove special casing for macosSami Shalayel2025-10-131-1/+1
| | | | | | | | There does not seem to be an explanation for it, and it does not seem to break the CI. Remove the macos special casing. Change-Id: I94b8e3ff4129247c25e87d7401897b4871c3cdf6 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* qmlClearEnginePlugins: call unregisterTypes on static pluginsSami Shalayel2025-10-131-26/+46
| | | | | | | | | | | | | | | | It seems that we call registerTypes on both static and dynamic plugins, but qmlClearEnginePlugins only unregisters dynamic plugins. This could cause incomplete cleanups in tests like tst_customization where qmlClearEnginePlugins should unregister plugins in both dynamic and static builds. Allow QmlPlugin to also contain a static plugin instance, and adapt unloadPlugin() to also unregister types from static plugins. Task-number: QTBUG-133755 Change-Id: Idb5a8e2754600715d8c820a73ae35cbf8991967f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Qt.rgba: use qBound to avoid assertsSami Shalayel2025-10-131-8/+4
| | | | | | | | | | | | | | | | | Use qBound that knows how to handle Nan to clip values into the 0, 1.0 range. The other methods (hsva, hsla) also use qBound to bound their values. This avoids an assert later when trying to round the NaN during the color conversion. The assert seems to have been added by df97b6b2de6282bd6422f1e531a42475dadc980d. Pick-to: 6.10 Task-number: QTBUG-140899 Change-Id: I4bb34b92ceac9d3ad667ae9b2714772bc800a600 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* QtQml: Fix instanceof for URL and URLSearchParamsUlf Hermann2025-10-131-2/+6
| | | | | | | | | | The ctors and prototypes need to be linked together. Task-number: QTBUG-138545 Change-Id: I5423dfb7d04c4d496d734ab5fc8252b6feb54a11 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Fix resolution of aliases to local aliasesUlf Hermann2025-10-131-5/+20
| | | | | | | | | | | | | When we find an alias to a local alias, we need to first check if the target alias is already resolved. Otherwise we can't insert the source alias, yet. Amends commit 9e1378260a3f3a6eb4cad8d6ae47bc218e6a2b5f. Pick-to: 6.10 Fixes: QTBUG-141059 Change-Id: If272a746595b39cb2dbc2b8cc0c2f688277cfe59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Use QQmlStringConverters to create QColor from stringsUlf Hermann2025-10-131-5/+5
| | | | | | | | | | | | | We use the same method in QQmlPropertyValidators. It's more efficient and it works even if you haven't imported QtQuick. Using a different method for the property assignment risks producing an invalid result. Amends commit a09ea6b3d6265a98c17e190db007fecfbd76f317. Pick-to: 6.10 6.8 Change-Id: I7dda609d0b6a3f9a32c71649a524bf1101d9fd12 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Prefer write via QQmlProperty in setInitialProperty and fix crashFabian Kosmale2025-10-131-17/+22
| | | | | | | | | | | | | | Rely on QQmlProperty to properly resolve everything. Ideally, we could get rid of the fallback loop, but QQmlProperty does not support setting nested gadget properties. Note that iniital properties are resolved in the context of the object, not of the file call Qt.createObject – this is relevent when one wants to set attached properties. Change-Id: I3868aae47a9e507c3ab1b848c82512e5ee04ff18 Fixes: QTBUG-138825 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlProperty: Handle reset for object properties, tooFabian Kosmale2025-10-131-5/+6
| | | | | | | | | | | | | Amends d231bd6f735bd8f473bc29079d4608660aaca98e, which put the reset logic only into the fallback path. However, the special cases might return early, in which case the fallback path never gets called. This happened e.g. with QObject based properties. Avoid the issue by handling resets first. Pick-to: 6.10 Task-number: QTBUG-138825 Change-Id: Ie31170558c9a0a6b0c244455ee3baccdb97a7043 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix writing undefined via QQmlPropertyFabian Kosmale2025-10-121-0/+5
| | | | | | | | | | | | | Just as with QMetaProperty::write, writing an invalid QVariant should trigger a RESET function if it exists. This not only helps with consistency, but will be needed to correctly handle writes of initial properties when doing more work via QQmlProperty. Pick-to: 6.10 Task-number: QTBUG-138825 Change-Id: I77058d292bdea34c0b500e6b61b29bca67ff8d99 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: Group "pure" formatting and tool behavior optionsFabian Kosmale2025-10-101-24/+17
| | | | | | | | | | | | Make it easier to see which options can be configured via the .qmlformat.ini file, by grouping them together, both in qdoc as well as in the help options. Fixes: QTBUG-127344 Pick-to: 6.10 Change-Id: I39501f8d30ce43a50e8a87a44f9d3769993f59ab Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qmltc: Fix context assignmentUlf Hermann2025-10-102-4/+4
| | | | | | | | | | | | | | If an object is not the document root we need to set the document root's context as its outer context, so that IDs end up in the right place. However, when calling a method on an object, we need to provide the context the method was declared in, not the context the object was instantiated in. Otherwise we get the wrong set of IDs. Pick-to: 6.10 Fixes: QTBUG-139142 Change-Id: Iaeba89c44c955ed09a9778e5d6cc4150e86793ba Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* QtQml: Support trailing comma in list propertiesUlf Hermann2025-10-091-4/+7
| | | | | | | Pick-to: 6.10 Fixes: QTBUG-119504 Change-Id: I553c8ea3277fef6a04e48aab4a5b510bee4e9e0c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Don't allocate empty arrays of ID valuesUlf Hermann2025-10-091-1/+2
| | | | | | | | | | Those are unusable anyway. Pick-to: 6.10 Task-number: QTBUG-138918 Change-Id: Ie7b381492d8b42b38c4a29e59d74d76058922318 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Reset scope object call lookup if it failsUlf Hermann2025-10-091-2/+8
| | | | | | | | | | | | | In exceptional circumstances the function can turn out to be null. This may happen if the context has already been torn down. We must not try to call it then. Also, fix the error message to include the actual object. Pick-to: 6.10 Fixes: QTBUG-140465 Change-Id: I6fc446fbc8df70c9652c1efef03daed9fa9ea839 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Be explicit about type-conversion for QString::args()Edward Welbourne2025-10-081-1/+1
| | | | | | | | | | | | | | | | Passing a quint32_le depended on a type conversion that might not be obvious to the reader. That's going to stop working when QString::arg() gets finnickier about which overloads get coerced to integral types, to avoid problems with types that convert fo floating-point but aren't recognised by the compiler *as* floating-point, so were otherwise being cast via integral types and losing precision. Pick-to: 6.10 Task-number: QTBUG-138471 Change-Id: I9b4df08159502c9109fa8489b2290e213bcff2b8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Value tpyes: improve conversion warningsFabian Kosmale2025-10-062-13/+22
| | | | | | | | | | | | | Add some information from the stacktrace, so that users can find the offending QML line. Moreover, use QDebug::toString instead of QVariant::toString for stringifying variants, as the former has a higher chance of creating some string representation. Fixes: QTBUG-139749 Pick-to: 6.10 Change-Id: I340d1312fcda604eb921cf289684256fc8e464d4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Add plugin options to qt_generate_deploy_qml_app_scriptJoerg Bornemann2025-10-062-0/+20
| | | | | | | | | | | | | | | Add the following options to qt_generate_deploy_qml_app_script to be in sync with qt_generate_deploy_app_script: NO_PLUGINS, EXCLUDE_PLUGINS, EXCLUDE_PLUGIN_TYPES, INCLUDE_PLUGINS, and INCLUDE_PLUGIN_TYPES. [ChangeLog][CMake] Added NO_PLUGINS, EXCLUDE_PLUGINS, EXCLUDE_PLUGIN_TYPES, INCLUDE_PLUGINS, and INCLUDE_PLUGIN_TYPES options to qt_generate_deploy_qml_app_script. Pick-to: 6.10 Fixes: QTBUG-140665 Change-Id: Ida20a07379e152cb0b65e278c8cd72c016ed07b0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Remove a duplicate item from TOCAlexei Cazacov2025-10-061-1/+0
| | | | | | Pick-to: 6.10.0 6.10 Change-Id: I8233f33b9555f8fa0b3ec694aaa7e85162edc0b8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix API names in "Enumeration key string <-> key value helpers"Alexei Cazacov2025-10-061-6/+8
| | | | | | Pick-to: 6.10 Change-Id: I47a3b0f7baf3914283644c41c7e91a07053f9bd0 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Doc: Fix broken links in Qt QmlAlexei Cazacov2025-10-063-6/+7
| | | | | | Pick-to: 6.10 Change-Id: Ib90bfd8f537fcec1128565116f9d223506523a1e Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Fix assigning to QML-defined list propertiesUlf Hermann2025-10-024-62/+216
| | | | | | | | | | | | | | | | | Returning an invalid QVariant from toVariant() is not helpful. We can't produce a QQmlListReference in that case because there is no object, but a QObjectList works just fine. Writing to list properties via the metaobject is very much supported. We can easily implement it using the same technique we use for reading. Finally, to get the signal counts right, we also need to compare the lists before assignment when taking the QQmlProperty code path. Pick-to: 6.10 6.8 Fixes: QTBUG-140690 Change-Id: I09d6412f3f2ec86144810f47d0d620b63dfcd280 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* qmlls.ini generation: check parent build dir before writing itSami Shalayel2025-10-011-2/+15
| | | | | | | | | | | | | | | | | When we see a qt_add_qml_module(URI org.kde.foo) call, we assume during the .qmlls.ini generation that the QML module will end up at <build>/org/kde/foo/. When this assumption doesn't hold, for example when CMakeLists.txt is in /some/path/to/source/CMakeLists.txt, we added /some/ as build directory because of a missing check that "path", "to" and "source" are equal to "org", "kde" and "foo". Add a check and use the build directory as is when a mismatch between uri and CML.txt is detected. Fixes: QTBUG-138599 Pick-to: 6.10 Change-Id: Ifba0086e70ca9a8f5c9212dd97fb5c8636875090 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: document qmlformat disable featureSemih Yavuz2025-10-011-0/+21
| | | | | | | Fixes: QTBUG-97796 Change-Id: I0f6c137acd4f15d2c272e065a58d082a7c951c31 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Deprecate QQmlPropertyMap default ctorUlf Hermann2025-10-013-0/+32
| | | | | | | | | | | | | | It's dangerous since you can't use it for derived classes. Instead, provide a factory function. Make it possible to specialize the QQmlElement ctor so that we can plug in the two-argument QQmlPropertyMap ctor when someone explicitly registers QQmlPropertyMap as creatable type (such as tst_qqmlpropertymap does). Fixes: QTBUG-140554 Change-Id: I264156ae27e5e234daad47fec3e0333f3ea89f4a Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Clear cached value type instances when clearing component cacheUlf Hermann2025-10-011-0/+5
| | | | | | | | | | The value type instances can hold on to compilation units, thereby keeping parts of the type registry alive. Pick-to: 6.10 6.8 Fixes: QTBUG-138518 Change-Id: I490d9c7599b80c86236c29a5c009a3d75a1b6d5c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Doc: Remove misleading example about alias overridingUlf Hermann2025-09-302-41/+0
| | | | | | | | | | | Apparently the author wanted to show an alias overriding a property and still retain control over the property. This doesn't work and simply confuses any reader. Pick-to: 6.10 6.8 Change-Id: Id63708eb7623d4cd24a81135156b237d85f2ca74 Reviewed-by: Dmitrii Akshintsev <dmitrii.akshintsev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmlformat: format return type annotationsSami Shalayel2025-09-301-3/+2
| | | | | | | | | | | Adapt the parser to not ignore return type annotations in function declarations, and visit the return type annotations in the ScriptFormatter visitor. Pick-to: 6.10 Task-number: QTBUG-137944 Change-Id: Ib54aa17b056a87215baa83535038b867a3b7e195 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qmlformat: format list type annotationsSami Shalayel2025-09-302-1/+7
| | | | | | | | | | | | | | | | Add sourcelocations for `<>` in list types like `list<int>` in AST::Type, and fix their lastSourceLocation() method to show the `>` location when applicable. Add the new sourcelocations to qqmldomcomments to also be able to anchor comments around the `<>`. Implement ScriptFormatter for list type annotations. Pick-to: 6.10 Task-number: QTBUG-137944 Change-Id: I73af498a9165f99fdceb69c8822ce5bb94e02ff9 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Replace nokia.com logo URLs with something that works for nowShawn Rutledge2025-09-261-1/+1
| | | | | | | | | If only the qt.io website could be relied upon to have a Qt logo in the same path for eternity... Pick-to: 6.8 6.10 Change-Id: Ie221bd85152af42bdf36655083932ca8341c7d2a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* qml: silence clang-21 warningsTim Blechmann2025-09-241-3/+2
| | | | | | | | | | | | | clang-21 emits -Wunnecessary-virtual-specifier when having virtual functions in classes declared as `final`. This patch removes these unnecessary `virtual` keywords and delcares the formerly protected function private, as protected does not make sense for final classes. Pick-to: 6.10 Change-Id: Ic6d91de5573f4b325e89bfbc2a9449791ccf94e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlValueTypeWrapper: ensure value types alignment is respectedAurélien Brooke2025-09-231-13/+10
| | | | | | | | | | | | | | | Use QMetaType create() and destroy(), instead of operator new() + construct() and destruct() + operator delete(). The QMetaType functions do the same work, but with the correct alignment. For write(), align the alloca buffer by oversizing and std::align. Remove the if(gadgetPtr()) since QMetaType::destroy() accepts nullptr. Amends 30a95fa0ee4a456cc41d652bf5f6b3c1fce944fb. Change-Id: Ia28882cef864e0199465ad791cd40328d14a8add Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQml: Fix initialization of non-optional static pluginsTim Blechmann2025-09-231-4/+11
| | | | | | | | | | | | | | | | | Don't let the initialization of a non-optional, supposedly dynamic, plugin pass if there actually is no QPluginLoader for it. The absence of the QPluginLoader in this case tells us that the plugin is in fact static and we need to check the static plugin map. Optional static plugins are not an issue here since there is no code path to create instances of those. They need to be linked into the application and thereby have their module registration function hooked up in order to be reachable at all. Pick-to: 6.10 Task-number: QTBUG-140220 Change-Id: I82e44fba2f2880ada16a5ea60e2e33f1900b208e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Preserve return type annotation for function expressionsLuca Di Sera2025-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser for QML allows the specification of type hints on a series of callable elements; such as functions defined as part of a QML type. It is possible, for example, to provide an hint for the return type of a function expression, anonymous or not, such as: ``` import QtQml QtObject { property var: function (lhs: int, rhs: int)): int { return lhs + rhs; } } ``` While this parses correctly, the return type annotation is currently discarded as part of the parsing process, such that in turn it is invisible to the engine when managing the function. Hence, ensure that the return type annotation for function expressions is preserved during the parsing process so that it can later be visible to the engine. In particular, the AST node that represents this kind of element can already store a type annotation that refers to its return type and later down the line, the code generation phase is already able to take into account the annotation when it builds its representation of the function. Nonetheless, that storage is currently purposefully not used in the cases we are interested into, albeit it is in other cases that might be considered more common. This is most probably, albeit nowhere near certainly, due to simple historical reasons and partial implementations related to type hints. Thus, ensure that the return type annotation is correctly preserved and stored for `FunctionExpression` rules during the parsing process, such that it can later be recognized and used by the engine. A few test cases related to the return type annotation were added. Pick-to: 6.10 Task-number: QTBUG-137944 Change-Id: I6133bb286a916d0687ff5d5542b9aa769cfd493b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Doc: Unify cli options and file settings in a single table for qmlformatLuca Di Sera2025-09-181-77/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current documentation for the qmlformat tool uses two separate tables to list the available command line options and the available settings file variables. Some of the content is duplicated between the two tables, as the settings file variables always have an equivalent command line option to configure the same behavior. Despite the duplication, the two tables aren't entirely in sync and don't necessarily provide the same amount of information. For example, the command line options table misses some of the default value for certain configurable behaviors or, similarly, certain descriptions might be more thorough in one table rather than the other. Since both tables generally should present the same information for those features that can be configured both from a command line option and from a settings file variable, as they present two different but supposedly equivalent interfaces to the same feature, the tables are now unified into one, so as to ensure that the description and default value for the relevant elements can more easily remain in sync, further reducing the unnecessary duplication between the tables. In particular, the command line options table was expanded with an additional column, `Setting Name`, that is set to "N/A" when the command line option has no equivalent settings file variable and contains the relevant variable name, taken from the other table, when it does. The default values for the relevant element were moved from the settings file table to the now unified table where necessary. Since the command line options use flags for boolean variables, where a behavior is implicitly disabled unless the flag itself is present as part of the invocation, the meaning of "a default value of false" could be confusing, possibly suggesting that the user could pass a "false" or "true" value to the flag to set the behavior. To avoid this confusion, the "Default Value" column was modified to be a "Default State/Value" column, and the cell for rows that are affected by the above issues were modified to be defined as "disabled/false", hopefully making it more explicit that there is a difference between the state-based command line usage and the value-based settings file usage. The description for elements of the above kind was extended to be more specific about the difference in usage with regards to a command line invocation and a settings file customization. The descriptions for the relevant element were brought over from the settings file table where they either provided additional information or provided stronger layout for the presented information. The original settings file table was removed as its information is now embedded in the unified table. A "\target qmlformat-settings" command that pointed to the now removed settings file table was removed as it was unused in the project, with the consideration that the unified table already provides a "\target" that can be linked to if necessary. The title of the section presenting the table was modified to "Options and settings" to explicit the presence of the new unified information. A phrase referring to the command line options table as presenting the available command line options was modified to explicit the presence, in the now unified table, of both command line options and settings file variables. Fixes: QTBUG-139125 Change-Id: Iedcc9ee0a1b3a70417db10736cef4a2955b43750 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QQmlPropertyCache: tiny cleaning of QQmlPropertyCache::append methodDmitrii Akshintsev2025-09-172-45/+33
| | | | | | | Remove some code-duplication. Change-Id: Id04e81211fa9c65dde2ba41bbda02411933463d8 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QQmlPropertyCacheCreator extract and expose tryCreateQQmlPropertyDataDmitrii Akshintsev2025-09-173-39/+52
| | | | | | | | | | This patch aims to extract the logic of transforming QV4::CompiledData::Property into QQmlPropertyData. Currently it's arguably a responsibility of QQmlPropertyCacheCreator because it is responsible for the resolution of property type, which is central to the creation of QQmlPropertyData. Such refactoring allows more detailed and robust testing of irProperty -> QQmlPropertyData, which is handy in the context of QTBUG-98320 to make sure that property attributes are propagated correctly to the QQmlPropertyData (and later to the cache). Change-Id: Iffdfd22f515016c61c087414f0c4530e43556091 Task-number: QTBUG-98320 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlPropertyCacheCreator: make use of q23::expectedDmitrii Akshintsev2025-09-171-24/+25
| | | | | | | | Expected type is more expressive and suitable for the current usecases than std::variant. Change-Id: Ib07885ce6f32036f4719432c0e4b5a1c7294f2b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlPropertyCacheCreator: decouple resolution of property type and flagsDmitrii Akshintsev2025-09-172-52/+93
| | | | | | | | | | | | | | | This patch aims to improve readability and maintainability of the logic for deriving property type and flags before adding it to cache. Now resolution of the type happens in one place and derivation of flags in another one. This not only improves separation of concerns, but also makes the dependency between attributes and type more explicit and hopefully easier to follow. Task-number: QTBUG-98320 Change-Id: I64424e959ee11aa5c9a90c8e9fd2ca1347715342 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* cmake: support running qmlcontextpropertydump via CMakeSami Shalayel2025-09-174-4/+93
| | | | | | | | | | | | | | | | Add a CMake target `dump_qml_context_properties` to run qmlcontextpropertydump with the correct options. qmlcontextpropertdump creates a file called .qt/contextPropertyDump.ini that qmllint reads to warn about potential context property usages. Also add a `clean_qml_context_properties` target that allows to remove the context property dump file. Add a CMake option QT_QMLLINT_CONTEXT_PROPERTY_DUMP that allows to run qmlcontextpropertydump as part of the lint targets. Task-number: QTBUG-128232 Change-Id: I2b167a018df82140e7b36fcdb75ca4cbc050d7fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Mark security criticality for most files in qml/parserFabian Kosmale2025-09-1610-0/+10
| | | | | | | | | | | | | | | | | | | | | Mark the lexing / parsing code as security critical, because they are data parsers. While _running_ QML code needs to assume trusted input, we probably should not have this restriction on the parser, so that tools like qmllint, qmlls and qdoc can safely pass any file to the parser, without having to worry about security implications. The criticality extends to qqmljskeywords_p.h, as we do custom bounds checking in the functions defined there. qqmljsastfwd_p is marked as insignificant, as it only contains fowrard declarations and no logic at all. The other marked files have the default level (significant). QUIP: 23 Task-number: QTBUG-136966 Pick-to: 6.10 6.9 6.8 Change-Id: I1e44f346d91d6d66c8e9632f0dec4a11fffc935a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CRA review qml/jsruntimeFabian Kosmale2025-09-16156-0/+161
| | | | | | | | | | | | | | | | | | This relies heavily on the documented fact that we only support trusted QML/JS content, meaning most files are only significant, not critical. This also extends to the handling of qmlc files (as in compilationunitmapper), as we store them in a user owned, non-shared cache directory – so any vulnerability there would already mean that an attacker has write-priviledges on user data. An exception is ArrayBuffer, which can be used with arbitrary user data, and should create a valid QBA. Fixes: QTBUG-136970 Pick-to: 6.10 6.9 6.8 QUIP: 23 Change-Id: I22033fe6ab4acf8362a8183e25b92331d45cb32c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQml: Unregister QML animation timer on deletionUlf Hermann2025-09-161-0/+2
| | | | | | | | | | | | The QUnifiedTimer generally outlives the QML animation timer and needs to be notified about that latter's deletion. Otherwise it will hold a dangling pointer. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-136629 Change-Id: I52b7f2f3ae716128e4acac628ea29477fc17b677 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>