Previously calling a JavaScript function with variable arguments could
cause the linting process to error out because of a lack of matching
function arguments.
This is now handled by defaulting to a JavaScript method if no matching
function signature can be found.
Fixes: QTBUG-98299
Change-Id: I748a60839106243a12bffd8d715b48cbc53d7f57
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This gives us type information for a few extra properties, among which
is ArrayBuffer. We also declare ArrayBuffer as extension to QByteArray,
which we can now test with qmllint.
Change-Id: Ibb3da5e8b8a9e839dc6365fbeabe8418022d1346
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Methods on the "Math" object preferably deal with numbers, and if we
pass them numbers, they also return numbers. Model this as overrides of
the generic methods.
Change-Id: I419093630577c371846e5c8ac153f90ed6ffa87e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way it actually generates interesting data about the JavaScript
types, for example the functions of the String prototype. Add a helper
method to create a symbol to QJSEngine. This should be generally useful.
Change-Id: I6c7b253b9d6cdb61602ceeae0955aed8d942c139
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This change adds jsroot.qmltypes which represents QJSEngine's global / root object and a tool to generate it (qmlsjrootgen).
If you wish to regenerate jsroot.qmltypes run the following commands:
qmljsrootgen jsroot.json
qmltyperegistrar jsroot.json --generate-qmltypes src/imports/builtins/jsroot.qmltypes --import-name QJSEngine --major-version 1 --minor-version 0
Fixes: QTBUG-90807
Change-Id: I5ba0a048586d2dd945009d65c2b51be8ead85feb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>