Commit 1656d600 authored by Gunnar Sletta's avatar Gunnar Sletta Committed by The Qt Project
Browse files

Make sure QSGRenderLoop is cleaned up cleanly.

e13547c5

 used a global static to clean
up QSGRenderLoop which is triggered very late, potentially after
SG backend API plugins have been unloaded. This results in crashes
when used in combination with scenegraph-playgrounds's customcontext.

Partially revert the change and instead clean up at the time of
QApp::aboutToQuit and make sure we also disconnect cleanly from
all QQuickWindows.

This change also ensures that QSGRenderLoop::windowDestroyed() gets
called for all QQuickWindows registered with the render loop. This
ensures that rendering stops and that scene graph nodes and resources
will be cleaned up regardless of whether the application has
remembered to delete the window or not. This is a good thing as it
makes the scene graph shutdown a bit cleaner.

Change-Id: I9cb9093979f8eac05542f118a6ff9cfe5c84f745
Reviewed-by: default avatarPaul Olav Tvete <paul.tvete@digia.com>
parent 99308192
Branches
Tags
No related merge requests found
Showing with 66 additions and 17 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment