aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-11-25 12:41:44 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2021-11-26 21:23:08 +0100
commitd8e73b588a4d5a6f3ee38acd455fb8aa3f0cc190 (patch)
treec7fc03e373664a63597ea27d4714af21ce4798d9 /tools
parent3bb8ef28a73a1469c1bbc4384d134deb466a4030 (diff)
qmllint: Properly handle JavaScript functions with variable arguments
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmljsrootgen/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/qmljsrootgen/main.cpp b/tools/qmljsrootgen/main.cpp
index e151d89f8c..a84ca0015b 100644
--- a/tools/qmljsrootgen/main.cpp
+++ b/tools/qmljsrootgen/main.cpp
@@ -250,6 +250,7 @@ static QString buildClass(const QJSManagedValue &value, QJsonArray *classes,
methodObject.insert(QStringLiteral("access"), QStringLiteral("public"));
methodObject.insert(QStringLiteral("name"), info.name);
+ methodObject.insert(QStringLiteral("isJavaScriptFunction"), true);
const int formalParams = propFunction->getLength();
if (propFunction->isConstructor()) {