aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltype_p_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-21 10:40:27 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-02 13:21:09 +0200
commit45594322fe91eadcd9b2d7b1d76c1a6662bc1472 (patch)
treed14e743f40351ca7a660984616b2500aa83032f5 /src/qml/qml/qqmltype_p_p.h
parentd621027babff9a30d56ab6af871a465108c9eaba (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/qqmltype_p_p.h')
-rw-r--r--src/qml/qml/qqmltype_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltype_p_p.h b/src/qml/qml/qqmltype_p_p.h
index cdd46aee7c..426b9ced37 100644
--- a/src/qml/qml/qqmltype_p_p.h
+++ b/src/qml/qml/qqmltype_p_p.h
@@ -116,6 +116,7 @@ public:
void (*newFunc)(void *, void *);
void *userdata = nullptr;
QString noCreationReason;
+ QVariant (*createValueTypeFunc)(const QJSValue &);
int parserStatusCast;
QObject *(*extFunc)(QObject *);
const QMetaObject *extMetaObject;