aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-11-27 13:48:11 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-12-03 10:38:43 +0100
commit77c02343e2c86bd80994882d709fe12f745705ba (patch)
tree214ae179c7d62f4328aaf75b6447e08c5a5c7d32 /src/qml/qml/qqmlvmemetaobject.cpp
parent76aa1d578d0eb0e819bac34292f2788853dc5199 (diff)
Use QMetaType instead of metatype-id, take 2
This time, the ValueTypeFactory gets converted. As a consequence, many callers get touched again. Task-number: QTBUG-88766 Change-Id: I3a8b7d5cfeb7fac85daf1702febba205971d4256 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 2ae9707c22..bea8fc06f7 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -321,12 +321,13 @@ bool QQmlInterceptorMetaObject::intercept(QMetaObject::Call c, int id, void **a)
const int valueIndex = vi->m_propertyIndex.valueTypeIndex();
const QQmlData *data = QQmlData::get(object);
- const int type = data->propertyCache->property(id)->propType().id();
+ const QMetaType metaType = data->propertyCache->property(id)->propType();
+ const int type = metaType.id();
if (type != QMetaType::UnknownType) {
if (valueIndex != -1) {
QQmlGadgetPtrWrapper *valueType = QQmlGadgetPtrWrapper::instance(
- data->context->engine(), type);
+ data->context->engine(), metaType);
Q_ASSERT(valueType);
//
@@ -930,7 +931,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void *
const QQmlPropertyData *pd = targetDData->propertyCache->property(coreIndex);
// Value type property or deep alias
QQmlGadgetPtrWrapper *valueType = QQmlGadgetPtrWrapper::instance(
- ctxt->engine(), pd->propType().id());
+ ctxt->engine(), pd->propType());
if (valueType) {
valueType->read(target, coreIndex);
int rv = QMetaObject::metacall(valueType, c, valueTypePropertyIndex, a);