Qt Declarative (Quick 2)
Go to file
Ulf Hermann 91c6d45559 QmlCompiler: Allow lists as arguments to methods
Since lists are allowed as property types, you should be able to pass
them as arguments to methods, too. For now we only handle QML-defined
methods, implemented by adding JavaScript functions to your QML
elements. The usual type coercion rules apply if you pass JavaScript
arrays to such methods. That is, it usually works.

We now resolve properties with the "list" flag to their actual types
(QQmlListProperty or QList) already when populating the QQmlJSScope, and
store the list types as members of QQmlJSScope rather than as a special
map in QQmlJSTypeResolver. This allows us to do the same to lists passed
as arguments and simplifies some of the type analysis.

Fixes: QTBUG-107171
Change-Id: Idf71ccdc1d59f472c17084a36b5d7879c4d959c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-10 15:00:11 +01:00
LICENSES Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
cmake Make Sure that `qml_compile_hash_p.h` Isn't Missing 2022-10-26 14:02:58 +02:00
coin qmldom: use a released Qt 6.3 2022-10-06 11:41:18 +00:00
dist Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
examples QmlExamples: Add missing dependencies of QtQuick in CMakeLists 2022-11-07 18:15:57 +01:00
features Add the skeleton for a D3D12 backend 2016-02-19 14:51:37 +00:00
src QmlCompiler: Allow lists as arguments to methods 2022-11-10 15:00:11 +01:00
tests QmlCompiler: Allow lists as arguments to methods 2022-11-10 15:00:11 +01:00
tools QmlCompiler: Allow lists as arguments to methods 2022-11-10 15:00:11 +01:00
.cmake.conf Enable syncqt cpp 2022-10-28 17:34:03 +02:00
.gitattributes qmlformat: improve testing of file based options 2021-11-04 13:35:48 +01:00
.gitignore Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00
.gitmodules Update to the latest version of the ecmascript test suite 2018-04-26 20:26:36 +00:00
.tag Use tree hash rather than commit hash in .tag file 2022-01-25 23:55:27 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
README.md Rewrite README.md 2021-08-12 13:15:17 +00:00
conanfile.py Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
configure.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2022-11-09 09:27:59 +00:00
qt_cmdline.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
qtdeclarative.doxy Add doxyfile for building doxygen documentation 2018-08-16 15:54:40 +00:00
sync.profile qmltyperegistrar: Extract into own library 2022-07-01 13:55:42 +02:00