diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/shadowedMethod.qml')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/shadowedMethod.qml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/shadowedMethod.qml b/tests/auto/qml/qmlcppcodegen/data/shadowedMethod.qml new file mode 100644 index 0000000000..590fb40b17 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/shadowedMethod.qml @@ -0,0 +1,35 @@ +pragma Strict +import QtQuick + +Item { + component B: Item { + function contains(point: point) : string { + return "b" + } + } + + + component C: Item { + function contains(point: point) : string { + return "c" + } + } + + property Item a: Item {} + property B b: B {} + property C c: C {} + + function doThing() : var { return a.contains(Qt.point(0, 0)) } + + property var athing; + property var bthing; + property var cthing; + + Component.onCompleted: { + athing = doThing(); + a = b; + bthing = doThing(); + a = c; + cthing = doThing(); + } +} |