diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml new file mode 100644 index 0000000000..d5b449c938 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/propertyVarOwnership.3.qml @@ -0,0 +1,31 @@ +import QtQuick 2.0 + +Item { + property var object + + property bool test1: false + property bool test2: false + + // Test methods are executed in sequential order + + function runTest() { + var c = Qt.createComponent("propertyVarOwnership.3.type.qml"); + object = c.createObject(); + + if (object.dummy != 10) return; + test1 = true; + } + + // Run gc() from C++ + + function runTest2() { + if (object.dummy != 10) return; + + object = undefined; + if (object != undefined) return; + + test2 = true; + } + + // Run gc() from C++ - QObject should be collected +} |