QQmlTreeRow: Don't build the tree recursively


QQmlTreeRow::unpackVariantMap() created a QQmlTreeRow for each child,
whose constructor called unpackVariantMap() again, recursing once per
level of the nested rows. Row data nested deeply enough exhausted the
native stack while building the tree.

Build the tree iteratively instead, keeping the rows still to be filled
in on an explicit stack.

Pick-to: 6.12
Task-number: QTBUG-151007
Change-Id: Ia16cd63980c4b86c67bc48dc2d615db5433dddbd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
commit2f77e1033471a28b93b89d7e21cd236876bfba70
parent2e297fae9dd48c549ca2b2d7e5e24fea6266e463
authorMate Barany <mate.barany@qt.io>
committerMate Barany <mate.barany@qt.io>
commit timeMon, 12 Oct 2026 12:28:16 +0000