Dequeue nodes from post-constructor init when their scene is unset


~QNode unsets the scene on its whole subtree before ~QObject deletes the
children. A child still queued for post-constructor init thus reached its
own destructor with a null scene, so the guard in
notifyDestructionChangesAndRemoveFromScene() skipped the dequeue. The next
event loop spin then called _q_postConstructorInit() on the freed node.

Dequeue in unsetSceneHelper() instead, while the scene is still reachable.

Pick-to: 6.12 6.11 6.8
Change-Id: I884a4bae2dc46c7235e011dd0845793bc947797d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
commitb8e6dd7bb817f3943c1d93f3c90d7f0d7370c6c8
parent6cda268c202a2510ea524db24512eb1bb70a20af
authorDavid Faure <david.faure@kdab.com>
committerDavid Faure <david.faure@kdab.com>
commit timeFri, 10 Jul 2026 09:42:33 +0000