QQmlTreeRow: Don't destroy the subtree recursively


The destructor of QQmlTreeRow destroyed its children through
std::unique_ptr, recursing once per level of the tree. A tree
nested deeply enough exhausted the native stack when rows were
removed or the model was destroyed.

Destroy the subtree iteratively instead, detaching the children
level by level.

Pick-to: 6.12
Task-number: QTBUG-151007
Change-Id: I9e28f28035147eff79fee846694ab8d39fa145ab
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
commite6150ba2d2db7dd03a4133458ee81522fbc6ad6d
parent71381b2cf4d59033adc54d45d3247784fd6efe05
authorMate Barany <mate.barany@qt.io>
committerMate Barany <mate.barany@qt.io>
commit timeFri, 9 Oct 2026 17:56:04 +0000