diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-28 20:58:40 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-04-28 22:34:54 +0200 |
commit | 78cb5de03db97ddc7f62e3e256ebfdd47ce3aae5 (patch) | |
tree | d62691cf6d120a8297a9c6ae97c50764c979abcf /src/qml/qml/qqmlprivate.h | |
parent | 768a6415b596e557cd84ffb56c3aa0e32645aa2f (diff) |
Initialize the metatypes of extensions
If we don't do that we can't look up the extension metatypes by name or
by ID, which is very inconvenient.
Change-Id: Ie93df186908c38de80a2f0b7c06c4df93cb4c5af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlprivate.h')
-rw-r--r-- | src/qml/qml/qqmlprivate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index cebbf47fdb..a98427d594 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -905,6 +905,9 @@ namespace QQmlPrivate qmlTypeIds }; + // Initialize the extension so that we can find it by name or ID. + qMetaTypeId<E>(); + qmlregister(TypeAndRevisionsRegistration, &type); } |