QTypedJson: simplify variant parsing complexity


Make handleVariant() show all tried out variants when it can't parse
JSON into a std::variant, instead of re-appending all previously seen
errors (including unrelated errors) to the error message. This decreases
the amount of generated warnings from quadratic to a linear amount.

Test written via Copilot.

Fixes: QTBUG-148485
Change-Id: I20fcb9283d23e2a72d1fa3d5c13c3ffa70b1b1fa
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
commitae0479a71035c17ed814fc65839f0e42dd3478e9
parent369dc9baf6e7994ca8844ebdcb3b4dc911dac288
authorSami Shalayel <sami.shalayel@qt.io>
committerSami Shalayel <sami.shalayel@qt.io>
commit timeFri, 31 Jul 2026 14:55:30 +0000