diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-05-29 14:18:34 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-07-10 10:02:20 +0200 |
commit | aab3f9e732829692672f9bb3e54a209d9b5d97b1 (patch) | |
tree | b3508061d93fe278cbe7dbc7a136af86f018f8b9 /src/qml/qml/qqml.cpp | |
parent | 0cfb44bf2972dc006ec6042b676f86d6059d0890 (diff) |
Add userdata callback to qml registration
This is needed in order to remove PySide2's qml type limit.
Change-Id: I331d9e31574a744eb9085222d58ea8a8789e0e31
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r-- | src/qml/qml/qqml.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index 9d58fa7d9b..65fb6b0062 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -319,6 +319,7 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data) type.listId, creatable ? type.objectSize : 0, nullptr, + nullptr, noCreateReason, type.uri, type.version, @@ -357,6 +358,7 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data) } else { revisionRegistration.elementName = elementName; revisionRegistration.create = creatable ? type.create : nullptr; + revisionRegistration.userdata = type.userdata; } assignVersions(&revisionRegistration, revision, type.version); @@ -480,6 +482,7 @@ namespace QQmlPrivate { QMetaType::fromType<QQmlListProperty<T>>(), 0, nullptr, + nullptr, uri, QTypeRevision::fromMajorVersion(versionMajor), |