QtQml: Don't create ScopedValues in a loop


Each of those takes a slot on the JavaScript heap, and might blow up the
stack.

Amends commit f2431370ad075a71b940dbd03eb3fa34f46b2405.

Pick-to: 6.12 6.8
Fixes: QTBUG-151133
Change-Id: Ia86970cb11f8d3fcf1a9545a73707553e31f2c19
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit78ee881e6f038f7cc03051b764f072f5eac260cd
parent2d68f28756ecfb6a413ccb86427842494993faad
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeWed, 7 Oct 2026 17:50:15 +0000