QmlJS: Avoid an occurrence of FilePath::toFileInfo()

Change-Id: I1c7573caf07e6259115b2d748301d20ec389e6bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2022-09-05 08:44:37 +02:00
parent 91c88c7390
commit 49e01f3074

View File

@@ -1226,11 +1226,9 @@ void ModelManagerInterface::updateImportPaths()
QmlLanguageBundles extendedBundles; QmlLanguageBundles extendedBundles;
for (const ProjectInfo &pInfo : qAsConst(m_projects)) { for (const ProjectInfo &pInfo : qAsConst(m_projects)) {
for (const auto &importPath : pInfo.importPaths) { for (const auto &importPath : pInfo.importPaths) {
const QString canonicalPath = importPath.path().toFileInfo().canonicalFilePath(); const FilePath canonicalPath = importPath.path().canonicalPath();
if (!canonicalPath.isEmpty()) { if (!canonicalPath.isEmpty())
allImportPaths.maybeInsert(Utils::FilePath::fromString(canonicalPath), allImportPaths.maybeInsert(canonicalPath, importPath.language());
importPath.language());
}
} }
allApplicationDirectories.append(pInfo.applicationDirectories); allApplicationDirectories.append(pInfo.applicationDirectories);
} }