forked from qt-creator/qt-creator
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:
@@ -869,7 +869,9 @@ static QString modulePath(const ImportInfo &import, const QStringList &paths)
|
||||
{
|
||||
if (!import.version().isValid())
|
||||
return QString();
|
||||
return modulePath(import.name(), import.version().toString(), paths);
|
||||
|
||||
const QStringList modPaths = modulePaths(import.name(), import.version().toString(), paths);
|
||||
return modPaths.value(0); // first is best match
|
||||
}
|
||||
|
||||
static void findNewLibraryImports(const Document::Ptr &doc, const Snapshot &snapshot,
|
||||
|
Reference in New Issue
Block a user