diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-06-18 14:08:55 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-20 10:27:30 +0200 |
commit | af6538971be60b8787fa8735c9e1c2ad0ad4bc11 (patch) | |
tree | 93f6751b16c8a24056b1d63659a587c01862046d /src/quick/items/qquickcanvas.cpp | |
parent | e57c04a18b6a8e593a7e89301b0a63456f2aee21 (diff) |
Cleanup SG properly in QQuickCanvas
The scenegraph renderer and root node were not cleaned up when all other
SG nodes are. This leads to a possible case where the SG nodes
regenerate for the canvas without being properly linked to the renderer.
Task-number: QTBUG-23571
Change-Id: I19084af998cb7482bfddc87770ee9b5e0aad3a6c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index f105944018..3cd894349c 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -1836,11 +1836,13 @@ void QQuickCanvasPrivate::cleanupNodesOnShutdown(QQuickItem *item) // This must be called from the render thread, with the main thread frozen void QQuickCanvasPrivate::cleanupNodesOnShutdown() { + Q_Q(QQuickCanvas); cleanupNodes(); cleanupNodesOnShutdown(rootItem); QSet<QQuickItem *>::const_iterator it = parentlessItems.begin(); for (; it != parentlessItems.end(); ++it) cleanupNodesOnShutdown(*it); + q->cleanupSceneGraph(); } void QQuickCanvasPrivate::updateDirtyNodes() |