diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-22 10:59:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-22 21:03:38 +0000 |
commit | aabf4e4f0474d8d6eb065fbab700432718070ae0 (patch) | |
tree | a46e81f56e797a34844093766ac62842995a79b6 /tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml | |
parent | c5737fd6ab63face36a2857b688c9aac85984bb9 (diff) |
Fix lookup of methods in the scope object
Commit 939014cb9cad2f3357f47b28a4580397c17b913c improved performance of
property lookups beyond the scope object, with the unfortunate
side-effect that the previously polymorphic lookup of methods broke.
Fix this by moving the handling to the caller side and falling back to
the string lookup for functions.
Fixes: QTBUG-71204
Change-Id: I2d9924034a9c14e7d161fa49d51b1f876ab5bc0f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml b/tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml new file mode 100644 index 0000000000..4a3cc52793 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/polymorphicFunctionLookup.qml @@ -0,0 +1,14 @@ +import QtQml 2.0 +QtObject { + id: root + property bool testFunc; + property bool ok: false + property QtObject subObject: QtObject { + function testFunc() + { + root.ok = true + } + + Component.onCompleted: testFunc() + } +} |