diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-17 17:46:33 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-18 12:13:47 +0100 |
| commit | 69fefd94e8b0ec2aa379d0b75ccaa2c58e3f0933 (patch) | |
| tree | 39647db4ed1d3414d34784b69bf3a0013cc498c1 /tests/auto/qml/qmlcppcodegen/data | |
| parent | 795d7dafe5be5cd48aa8225a1343285b3aca2be7 (diff) | |
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 <fabian.kosmale@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/functionLookup.qml | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt index 1cfd0b493c..6728ee3797 100644 --- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt +++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt @@ -61,6 +61,7 @@ set(qml_files extendedTypes.qml failures.qml fileDialog.qml + functionLookup.qml funcWithParams.qml functionReturningVoid.qml globals.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 +} |
