diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-03-23 13:18:04 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-23 08:04:08 +0100 |
commit | 91f9f123eb67bbdb2a0e65df6f29c6833635679b (patch) | |
tree | acbf962f29f663c2f1110d75b5a35763ad754677 /tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml | |
parent | b63ce68f316c91b0a3107d3d20e160628f5cefef (diff) |
Prevent the root object from being garbage collected.
Passing the root object as a return value from a C++ function could
cause the indestructible flag to be set to false.
Change-Id: Ib70c666f0d0ffbb48bca1996c2517fbccafa5dc1
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml b/tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml new file mode 100644 index 0000000000..b1b0b72a87 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/ownershipRootObject.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +QtObject { + id: root + Component.onCompleted: { setObject(root); getObject() } +} |