diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-03 01:11:42 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-18 12:51:38 +0100 |
commit | 5f76fabd0609f2a61b1ca53d88b6b76bb38e919a (patch) | |
tree | 604b1edcb9d690528a114c030cf8ddf5d93f746c /src/qml/jsruntime/qv4qobjectwrapper.cpp | |
parent | 26a97ace7cb9491a325f400b019d40f9413f0a68 (diff) | |
download | qtdeclarative-5f76fabd0609f2a61b1ca53d88b6b76bb38e919a.tar.gz |
Move propertyCache- and metaObject-related functions into QQmlMetaType
That's where the data resides. This allows us to lock the mutex only
once for all those methods, and it makes a large number of engine
pointers unnecessary.
Finally, we can now find the element type of a QQmlListProperty without
supplying an engine.
Change-Id: If1ae8eafe8762a112d1ca06f9c92ab8a727d1bda
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index a597aa881f..583aee7c66 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -2050,9 +2050,6 @@ bool CallArgument::fromValue( qvariantPtr = new (&allocData) QVariant(); type = QVariantWrappedType; - const QQmlEnginePrivate *ep = engine->qmlEngine() - ? QQmlEnginePrivate::get(engine->qmlEngine()) - : nullptr; QVariant v = engine->toVariant(value, metaType); if (v.metaType() == metaType) { @@ -2066,7 +2063,7 @@ bool CallArgument::fromValue( return true; } - const QQmlMetaObject mo = ep ? ep->rawMetaObjectForType(metaType) : QQmlMetaObject(); + const QQmlMetaObject mo = QQmlMetaType::rawMetaObjectForType(metaType); if (!mo.isNull()) { QObject *obj = QQmlMetaType::toQObject(v); |