aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlglobal_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-06-14 10:54:50 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-06-15 11:57:32 +0000
commita2104034d404179f5fad98fd54a133b288ded47d (patch)
tree7efcd2510ce8481a0e14ac6a665c0f384889ad61 /src/qml/qml/qqmlglobal_p.h
parent0c50edd6f5a819a7bc6e19c5ac69191d491167da (diff)
QML: Try QML conversion before metatype conversion
and guard against null gadgetPtr. This is what we get for uninitialized value type properties. Pick-to: 6.5 6.5.2 6.6 Fixes: QTBUG-114494 Change-Id: I86ad23abcc4fec219017d1aad6b7add1c9a9af5d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlglobal_p.h')
-rw-r--r--src/qml/qml/qqmlglobal_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index 95403d041a..bb710b059d 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -205,7 +205,9 @@ class QQmlValueTypeProvider
{
public:
static bool createValueType(QMetaType targetMetaType, void *target, const QV4::Value &source);
- static bool createValueType(QMetaType targetMetaType, void *target, const QVariant &source);
+ static bool createValueType(
+ QMetaType targetMetaType, void *target, QMetaType sourceMetaType, void *source);
+
static QVariant constructValueType(
QMetaType targetMetaType, const QMetaObject *targetMetaObject,
int ctorIndex, void *ctorArg);