QmlJS: Scan import paths, even if there is only one

Previously a single QML import path would not be scanned. This did not
usually happen to users, as there's almost always more than one path.
But it could lead to unexpected behavior in tests that explicitly
controled import paths.

Change-Id: I015f44f183ad484c333ab7a4e5e98b87098620a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Kamm
2020-05-19 11:18:45 +02:00
parent 96c860159b
commit 338fa26bc3

View File

@@ -1133,7 +1133,7 @@ void ModelManagerInterface::maybeScan(const PathsAndLanguages &importPaths)
pathToScan.maybeInsert(importPath);
}
if (pathToScan.length() > 1) {
if (pathToScan.length() >= 1) {
QFuture<void> result = Utils::runAsync(&ModelManagerInterface::importScan,
workingCopyInternal(), pathToScan,
this, true, true, false);