diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-20 12:45:31 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-26 17:58:09 +0100 |
commit | 08abb22443078dcd69cec98ea451a0e2e190982f (patch) | |
tree | c70b150ba7faf29f9b18dcb5e97b3ad0e0678633 /src/qml/qml/qqmllist.cpp | |
parent | e6b45a2f5dad8105a8f493e2167988a95c1f08ed (diff) |
QML engine: Use QMetaType instead of metatype-id in propertydata
We don't want to convert back and forth between QMetaTypes and ids. This
change is the first step towards using QMetaType directly everywhere.
By reordering the members of QQmlPropertyData to avoid a gap caused by
alignment, we can replace the typeid int with a QMetaType without
requiring more space.
There are still a few places left using metatype ids, notably the value
type logic.
Task-number: QTBUG-82931
Change-Id: Ic38f38d10c71ed20655877976c9cb5ee3cbe2d77
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllist.cpp')
-rw-r--r-- | src/qml/qml/qqmllist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp index 51499f816d..3b5b1fbc60 100644 --- a/src/qml/qml/qqmllist.cpp +++ b/src/qml/qml/qqmllist.cpp @@ -141,13 +141,13 @@ QQmlListReference::QQmlListReference(QObject *object, const char *property, QQml QQmlEnginePrivate *p = engine?QQmlEnginePrivate::get(engine):nullptr; - int listType = p?p->listType(data->propType()):QQmlMetaType::listType(data->propType()); + int listType = p?p->listType(data->propType().id()):QQmlMetaType::listType(data->propType().id()); if (listType == -1) return; d = new QQmlListReferencePrivate; d->object = object; d->elementType = p ? p->rawMetaObjectForType(listType) : QQmlMetaType::qmlType(listType).baseMetaObject(); - d->propertyType = data->propType(); + d->propertyType = data->propType().id(); void *args[] = { &d->property, nullptr }; QMetaObject::metacall(object, QMetaObject::ReadProperty, data->coreIndex(), args); |