aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickcanvas.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-03-30 17:36:40 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-02 08:03:23 +0200
commit9cddbbff9da88ba9c889ae1f306e837c3a66377e (patch)
tree450af1f4a12bf82eb475a113e1cd419ceffea216 /src/quick/items/qquickcanvas.cpp
parent5bb0180645ce55c28eb8b923bee61c74de3b9c0e (diff)
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>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r--src/quick/items/qquickcanvas.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp
index 5d4293a262..29733e9503 100644
--- a/src/quick/items/qquickcanvas.cpp
+++ b/src/quick/items/qquickcanvas.cpp
@@ -155,6 +155,10 @@ have a scope focused item), and the other items will have their focus cleared.
// #define TOUCH_DEBUG
// #define DIRTY_DEBUG
+#ifdef FOCUS_DEBUG
+void printFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1);
+#endif
+
QQuickItem::UpdatePaintNodeData::UpdatePaintNodeData()
: transformNode(0)
{