Fix appendChildNode() call


The QSGNode::appendChildNode() method checks that its parameter must
not have a parent. Before this patch we always called appendChildNode()
on a node that already had parent, which was always leading to ASSERT
in a debug build.
Seems that the right approach would be to call this method, if the
node *does not* have a parent.

Task-number: QTBUG-96795
Change-Id: I10e17d17eeadec41f8da8939f4a0009176bbbdbb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Lauri Laanmets <lauri.laanmets@eesti.ee>
commit6cb20a08b65c73b46e0201213869d213e0397791
parentd58daaadff5c38790dddcd1f265c1fa91100a76c
authorIvan Solovev <ivan.solovev@qt.io>
committerLauri Laanmets <lauri.laanmets@eesti.ee>
commit timeMon, 28 Feb 2022 17:11:36 +0200