From 8762e2fb681acb2947d2dd7243da12e546582723 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 2 Dec 2021 12:15:07 +0100 Subject: QQmlTypeNameCache: Unify querying for types Template all of the code and make sure the different query variants do the same work. There is no reason not to query the namespaced imports if we are passed a different string type as parameter. If we want to skip the namespaced imports, that is a separate parameter. This needs to be picked to 6.2 as precondition for fixing AOTCompiledContext::initLoadAttachedLookup. We need to pass a QQmlImport::RecursionRestriction when querying by QHashedStringRef. Pick-to: 6.2 Change-Id: I98aecc7775036728668cc93f550aa73fdefafe9a Reviewed-by: Fabian Kosmale --- src/qml/jsruntime/qv4qmlcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp') diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp index c3fbff7f55..1af801163d 100644 --- a/src/qml/jsruntime/qv4qmlcontext.cpp +++ b/src/qml/jsruntime/qv4qmlcontext.cpp @@ -218,7 +218,7 @@ ReturnedValue QQmlContextWrapper::getPropertyAndBase(const QQmlContextWrapper *r if (context->imports() && name->startsWithUpper()) { // Search for attached properties, enums and imported scripts - QQmlTypeNameCache::Result r = context->imports()->query(name, QQmlImport::AllowRecursion); + QQmlTypeNameCache::Result r = context->imports()->query(name); if (r.isValid()) { if (hasProperty) -- cgit v1.2.3