diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-02 12:15:07 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-03 08:20:52 +0100 |
commit | 8762e2fb681acb2947d2dd7243da12e546582723 (patch) | |
tree | 494fe7a9c78498988b2639cc2149e5b4edad07c1 /src/qml/jsruntime | |
parent | 05bf2f293a952eac7a41279815bf3480aa067586 (diff) |
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4qmlcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<QQmlImport::AllowRecursion>(name); if (r.isValid()) { if (hasProperty) |