Fix crash when changing the grandparent of an item with focus.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Fri, 30 Mar 2012 07:36:40 +0000 (17:36 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Apr 2012 06:03:23 +0000 (08:03 +0200)
commit9cddbbff9da88ba9c889ae1f306e837c3a66377e
tree450af1f4a12bf82eb475a113e1cd419ceffea216
parent5bb0180645ce55c28eb8b923bee61c74de3b9c0e
Fix crash when changing the grandparent of an item with focus.

When an item was reparented it's sub focus item was cleared and those
of it's children were cleared along with those in the tree the item was
removed from.  Since we now rely on the focus state of an unparented
tree to be correct we need to restore the sub focus items of the
unparented tree.

Change-Id: I236c512751b99092c7e9a39194f4680304bfacc5
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickcanvas.cpp
src/quick/items/qquickitem.cpp
tests/auto/quick/qquickitem/tst_qquickitem.cpp