From 69fefd94e8b0ec2aa379d0b75ccaa2c58e3f0933 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 17 Feb 2022 17:46:33 +0100 Subject: QmlCompiler: Do not crash on attempts to lookup a function in the scope Rather, reject the code and let the engine handle it. Pick-to: 6.2 6.3 Fixes: QTBUG-100980 Change-Id: Ibcd1249ba3550b40121622752b4ca22d1df3ed2a Reviewed-by: Fabian Kosmale Reviewed-by: Jarkko Koivikko --- tests/auto/qml/qmlcppcodegen/data/functionLookup.qml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/auto/qml/qmlcppcodegen/data/functionLookup.qml (limited to 'tests/auto/qml/qmlcppcodegen/data/functionLookup.qml') diff --git a/tests/auto/qml/qmlcppcodegen/data/functionLookup.qml b/tests/auto/qml/qmlcppcodegen/data/functionLookup.qml new file mode 100644 index 0000000000..211f524088 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/functionLookup.qml @@ -0,0 +1,6 @@ +import QtQml + +QtObject { + function foo() { return "a" + 99 } + property var bar: foo +} -- cgit v1.2.3