aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-01-21 12:30:20 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-21 23:26:21 +0000
commit4099a51dd5a9564e580a0f3676a0a850bd4ec26d (patch)
tree602488bbf8d86906202040ef704bc11020501656 /src
parent415ef1504349f08d0c0868995de3b43ef6c027f1 (diff)
QmlCompiler: Add C++ name also for types with no export candidates
Even if the type is only exported in a newer version of the module, we still need to know about it in an earlier version, in order to resolve base types. Change-Id: Ibc7940308e3c4aaebf9871a159e1d85f43cd7693 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 24e5b9090b513861e77dcb17b8e4d75f0bdf8651) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/qqmljsimporter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp
index a0d4a78fc9..407f128810 100644
--- a/src/qmlcompiler/qqmljsimporter.cpp
+++ b/src/qmlcompiler/qqmljsimporter.cpp
@@ -314,8 +314,12 @@ void QQmlJSImporter::processImport(const QQmlJSScope::Import &importDescription,
seenExports[qmlName].append(valExport);
}
- if (bestExport.isValid())
- types->cppNames.insert(cppName, { val.scope, bestExport.revision() });
+ types->cppNames.insert(
+ cppName, {
+ val.scope,
+ bestExport.isValid() ? bestExport.revision() : QTypeRevision::zero()
+ }
+ );
};
if (!importDescription.prefix().isEmpty())