From b81d3d5cd243282c2a060ea4ea6b35559e4c5e34 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Jan 2023 16:41:34 +0100 Subject: [PATCH] ProjectExplorer: Use FileUtils::commonPath instead of strings Change-Id: I917912fe441d1b72466c02ff9f3e743daa4eff92 Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/projectnodes.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index 45f185e5682..246b7f767a9 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -331,11 +330,11 @@ FilePath Node::pathOrDirectory(bool dir) const location = m_filePath; } else { // Otherwise we figure out a commonPath from the subfolders - QStringList list; + FilePaths list; const QList folders = folder->folderNodes(); for (FolderNode *f : folders) - list << f->filePath().toString() + QLatin1Char('/'); - location = FilePath::fromString(Utils::commonPath(list)); + list << f->filePath(); + location = FileUtils::commonPath(list); } QTC_CHECK(!location.needsDevice());