From 49e01f307443044de90f44d86a9733adf3a9ecfc Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 5 Sep 2022 08:44:37 +0200 Subject: [PATCH] QmlJS: Avoid an occurrence of FilePath::toFileInfo() Change-Id: I1c7573caf07e6259115b2d748301d20ec389e6bd Reviewed-by: Christian Stenger --- src/libs/qmljs/qmljsmodelmanagerinterface.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index 60c1906b0a4..03d8fb6fb85 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -1226,11 +1226,9 @@ void ModelManagerInterface::updateImportPaths() QmlLanguageBundles extendedBundles; for (const ProjectInfo &pInfo : qAsConst(m_projects)) { for (const auto &importPath : pInfo.importPaths) { - const QString canonicalPath = importPath.path().toFileInfo().canonicalFilePath(); - if (!canonicalPath.isEmpty()) { - allImportPaths.maybeInsert(Utils::FilePath::fromString(canonicalPath), - importPath.language()); - } + const FilePath canonicalPath = importPath.path().canonicalPath(); + if (!canonicalPath.isEmpty()) + allImportPaths.maybeInsert(canonicalPath, importPath.language()); } allApplicationDirectories.append(pInfo.applicationDirectories); }