diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-05 14:08:32 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-11 00:42:17 +0100 |
commit | 7a9a778604a03473b6c4ef8a481ba3cc06d48265 (patch) | |
tree | 52ba86a5f11a8dab39e194439f743f294d0ffc6f /src/qml/jsruntime/qv4qmlcontext.cpp | |
parent | 5eba4080511a006d10fc86d141d3f0f5abf0b8f8 (diff) |
QtQml: Remove QQmlTypeLoader from QQmlImport
The type loader belongs to the engine and we must not store it in
engine-independent data structures. We do want the import cache to be
stored in the type registry, though (in a separate change).
Change-Id: I2828f5098b27bf1fc96852fc2bd160db44b109e7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4qmlcontext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp index 7b4e5e7387..708339013f 100644 --- a/src/qml/jsruntime/qv4qmlcontext.cpp +++ b/src/qml/jsruntime/qv4qmlcontext.cpp @@ -197,9 +197,11 @@ ReturnedValue QQmlContextWrapper::getPropertyAndBase(const QQmlContextWrapper *r return result->asReturnedValue(); } + QQmlEnginePrivate *ep = QQmlEnginePrivate::get(v4->qmlEngine()); if (context->imports() && (name->startsWithUpper() || context->valueTypesAreAddressable())) { // Search for attached properties, enums and imported scripts - QQmlTypeNameCache::Result r = context->imports()->query<QQmlImport::AllowRecursion>(name); + QQmlTypeNameCache::Result r = context->imports()->query<QQmlImport::AllowRecursion>( + name, QQmlTypeLoader::get(ep)); if (r.isValid()) { if (hasProperty) @@ -258,7 +260,6 @@ ReturnedValue QQmlContextWrapper::getPropertyAndBase(const QQmlContextWrapper *r // Fall through } - QQmlEnginePrivate *ep = QQmlEnginePrivate::get(v4->qmlEngine()); Lookup * const originalLookup = lookup; decltype(lookup->qmlContextPropertyGetter) contextGetterFunction = QQmlContextWrapper::lookupContextObjectProperty; |