Fix handling of a direct child stealing focus from a parent-less item.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Thu, 7 Jun 2012 02:29:07 +0000 (12:29 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 8 Jun 2012 04:17:54 +0000 (06:17 +0200)
commit04b4445eadb09873821f165074c72c6f477e18d2
tree9910c1aae2d5af7b6897fc4780e01be513719533
parent762b4d90110465aeceb96f44cd06dcda229dfe89
Fix handling of a direct child stealing focus from a parent-less item.

When an item gains focus it will remove focus from the previous item
that held focus.  Normally this is the sub-focus item of an ancestor
item, however if the item with focus is at the root of the tree there
will be no sub-focus item and the focus of root item needs to be cleared
instead.  Likewise if an item doesn't have a parent, focus still needs
to be removed from any sub focus item.

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