diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml new file mode 100644 index 0000000000..abd0dd7c04 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/propertyVar.inherit.qml @@ -0,0 +1,34 @@ +import QtQuick 2.0 +import Qt.test 1.0 + +Item { + id: testInheritance + + property var varProperty + + function constructGarbage() { + var retn = 1; + var component = Qt.createComponent("PropertyVarInheritanceComponent.qml"); + if (component.status == Component.Ready) { + retn = component.createObject(null); // has JavaScript ownership + } + return retn; + } + + function assignCircular() { + varProperty = constructGarbage(); + gc(); + } + + function deassignCircular() { + varProperty = 2; + gc(); + } + + function assignThenDeassign() { + varProperty = constructGarbage(); + varProperty = 2; + gc(); + } +} + |