diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-21 10:40:27 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-02 13:21:09 +0200 |
commit | 45594322fe91eadcd9b2d7b1d76c1a6662bc1472 (patch) | |
tree | d14e743f40351ca7a660984616b2500aa83032f5 /src/qml/qml/qqml.cpp | |
parent | d621027babff9a30d56ab6af871a465108c9eaba (diff) |
Use factory functions and ctors for creating value types
As you can extend value types with QML_EXTENDED we may as well allow a
factory function in the extended type. Furthermore, if the original type
allows construction from QJSValue, we may just use that. In turn, we can
get rid of the value type providers now.
Change-Id: I9124ea47537eab6c33d7451080ab2fff942eaa7b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.cpp')
-rw-r--r-- | src/qml/qml/qqml.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp index 102bf22df5..d26a09b081 100644 --- a/src/qml/qml/qqml.cpp +++ b/src/qml/qml/qqml.cpp @@ -321,6 +321,7 @@ int QQmlPrivate::qmlregister(RegistrationType type, void *data) nullptr, nullptr, noCreateReason, + type.createValueType, type.uri, type.version, nullptr, @@ -493,6 +494,7 @@ namespace QQmlPrivate { 0, nullptr, nullptr, + nullptr, uri, QTypeRevision::fromMajorVersion(versionMajor), |