QmlCompiler: Remember through which imports documents see types


At run time, a type is found by name through an import of its module.
Different versions of a module can provide different types under
the same name. In order to find a type again the same way, we need to
know the exact import through which a document sees it. That includes
the imports of modules forwarded by qmldir "import" lines.

Track the module imports each import statement results in. When a
document imports a module or a directory, record for each type
it can see the module, the version of the import, and the name the
import provides the type under. Directory imports are recorded with an
invalid version, like the QML engine does.

Pick-to: 6.12
Task-number: QTBUG-150967
Change-Id: I5eb30eadb88a89281929288124fda75656ff6110
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
commit8de3799d59277300909fef78d3bb020c2cd58d88
parent8e98c4081ee47b658874e3943cbb8763c9b49935
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeMon, 12 Oct 2026 12:28:17 +0000