Implement generic conversion from QML types to gadgets


This is a temporary solution to facilitate the conversion of Places
QML types into value types, allowing us to get rid of the thin and
unnecessary QDeclarative* wrappers.

Support both conversion from QJSValue and from QVariantMap is needed to
allow value-initialization of nested types, such as QPlaceSupplier,
which has a QPlaceIcon property.

Once the QML engine implements property-by-property initialization, this
solution can be removed again. It is either way primarily relevant for
the unit tests, which need to be able to construct and initialize value
types from QML and JavaScript.

Change-Id: I253ce6415dd80ec6464c77bca197cff325149cf7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit734799d9f88c2383be87806d4931799b6f6a843a
parent22c3c1d155f817324ed535ba599633cad0e49b5e
authorVolker Hilsheimer <volker.hilsheimer@qt.io>
committerVolker Hilsheimer <volker.hilsheimer@qt.io>
commit timeWed, 14 Sep 2022 13:19:44 +0200