QTypedJson: update parseStatus on error in objects


Set the parse status to error when an object could not be constructed.

Deserialization of std::variant<> deserializes all the types in
the variant, and stops once one option did not fail. Without the fail
flag set, it will ignore incorrectly serialized components and create a
variant with the wrong type.

This fixes a special case where some variant was incorrectly
deserialized.

Fixes: QTBUG-124592
Change-Id: Ieef29b0f4a77b5efbf942a8cb5bb1d7f4e46afc4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commite408713529f8b6e1d25d402ec8cec394de83f49a
parentab90f3e0e2fe32dad5dc68a6d63cb0c33bb6f237
authorSami Shalayel <sami.shalayel@qt.io>
committerSami Shalayel <sami.shalayel@qt.io>
commit timeWed, 24 Apr 2024 08:52:59 +0200