Set rootItem'ownership as CppOwnerShip
authorCharles Yin <charles.yin@nokia.com>
Tue, 17 Apr 2012 06:47:33 +0000 (16:47 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 17 Apr 2012 11:36:22 +0000 (13:36 +0200)
commitf92c3aecd08eef468f9a47f2e970f22beecc8216
treeac87f59b2c2564669b437f3b5cd035cb1c7fda86
parent812997036a44733c3407d925f42d98c4ff0e6c6f
Set rootItem'ownership as CppOwnerShip

rootItem should not be deleted until the QQuickCanvas itself has been deleted.
Set the rootItem's object ownership to CppOwnerShip can prevent it being destroyed
by javascript destroy() method or v8 garbage collection.

Change-Id: I7d83fec8ffcb8062d143b1b050a38368a2af800f
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
src/quick/items/qquickcanvas.cpp
tests/auto/quick/qquickcanvas/data/ownershipRootItem.qml [new file with mode: 0644]
tests/auto/quick/qquickcanvas/qquickcanvas.pro
tests/auto/quick/qquickcanvas/tst_qquickcanvas.cpp