aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-05-15 21:01:06 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-19 11:15:08 +0200
commit851ae1a77dc207ec11b8ed3f0786bfe1c1905e4c (patch)
tree6576f581a94851366e4481ea6994b610636f5fe0 /src/quick/items
parent8f6254a88e4c634203df779aa385d9955e91b56f (diff)
Fix crash with running animators on re-shown windows.
The non-threaded render loops would clean up the nodes for a window when it was hidden, but the animators kept running and had a reference to the deleted nodes. This was not a problem for the threaded render loop as it would wipe the animator controller as well which would clean the jobs. Fix it by triggering a reset of all nodes in the animators when the window is told to clean up. If an animator is ticked when it doesn't have a node, it will simply do nothing. When the window is made visible again, we call initialize on all animators to find the new node. Task-number: QTBUG-37995 Change-Id: Ie5609d95db29f4b2b30ca5bf641dce901e528389 Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index d258b63484..6220ea2e1f 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2449,6 +2449,7 @@ void QQuickWindowPrivate::cleanupNodesOnShutdown()
QSet<QQuickItem *>::const_iterator it = parentlessItems.begin();
for (; it != parentlessItems.end(); ++it)
cleanupNodesOnShutdown(*it);
+ animationController->windowNodesDestroyed();
q->cleanupSceneGraph();
}