From 7a9a778604a03473b6c4ef8a481ba3cc06d48265 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 5 Jan 2024 14:08:32 +0100 Subject: 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 --- src/qml/jsruntime/qv4qmlcontext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp') 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(name); + QQmlTypeNameCache::Result r = context->imports()->query( + 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; -- cgit v1.2.3