QmlJS: Fix handling multiple import paths into same module

It is possible to import components of different paths to fill
a module.
Take further paths into account when looking up types.

Fixes: QTCREATORBUG-24405
Change-Id: I8d6bf0a324ea9c0d1fe9d91b40857f91f00dd662
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
Christian Stenger
2021-01-11 14:09:51 +01:00
parent 7dc72c533e
commit 6ea088c02f
5 changed files with 30 additions and 18 deletions

View File

@@ -57,8 +57,8 @@ QMLJS_EXPORT DiagnosticMessage errorMessage(const SourceLocation &loc,
QMLJS_EXPORT bool maybeModuleVersion(const QString &version);
QMLJS_EXPORT QString modulePath(const QString &moduleImportName, const QString &version,
const QStringList &importPaths);
QMLJS_EXPORT QStringList modulePaths(const QString &moduleImportName, const QString &version,
const QStringList &importPaths);
template <class T>
SourceLocation locationFromRange(const T *node)