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>