diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/fallbacklookups.qml')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/fallbacklookups.qml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/fallbacklookups.qml b/tests/auto/qml/qmlcppcodegen/data/fallbacklookups.qml new file mode 100644 index 0000000000..4b58cd344d --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/fallbacklookups.qml @@ -0,0 +1,34 @@ +import TestTypes +import QtQml + +DynamicMeta { + id: self + + function getSingleton(): QtObject { + return DynamicMetaSingleton.itself + } + + function withContext(): int { + foo = 93; + objectName = "aa" + foo; + return bar(4); + } + + function withId(): int { + self.foo = 94; + self.objectName = "bb" + foo; + return self.bar(5); + } + + function withSingleton(): int { + DynamicMetaSingleton.foo = 95; + DynamicMetaSingleton.objectName = "cc" + DynamicMetaSingleton.foo; + return DynamicMetaSingleton.bar(6); + } + + function withProperty(): int { + DynamicMetaSingleton.itself.foo = 96; + DynamicMetaSingleton.itself.objectName = "dd" + DynamicMetaSingleton.itself.foo; + return DynamicMetaSingleton.itself.bar(7); + } +} |