Don't remove a non-child node from a layer


A layer does not set a parent reference on its direct children.
Those children (the View3D's scene root, the ImportScene dummy,
explicit cameras) are owned and kept alive by other subsystems,
e.g. the scene root by the scene manager, so leaving their parent
unset keeps the layer's lifetime decoupled from theirs, as  they
can outlive the layer.
Sharing of imported scenes is handled by the ImportScene dummy
injected in QSSGRenderLayer::setImportScene().

Added a test that removing a foreign node from a layer leaves the
list it belongs to intact.

Fixes: QTBUG-147451
Pick-to: 6.12 6.11
Change-Id: I612b97554cf625ed85e5138daa718fdb810f7263
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
commitd3ceaa2b74723e4d42fd54588e0adc27fb71c957
parente47f797d4d6fc598db5863f2d861b862112bda83
authorChristian Strømme <christian.stromme@qt.io>
committerChristian Strømme <christian.stromme@qt.io>
commit timeWed, 5 Aug 2026 07:08:57 +0000