summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-01-03 16:41:34 +0100
committerhjk <hjk@qt.io>2023-01-04 09:40:26 +0000
commitb81d3d5cd243282c2a060ea4ea6b35559e4c5e34 (patch)
tree581f1b0abb891e02e24185e94ec05e95a63c8c42
parentba42169e8a3cf03252dc6abeb327dffa0025fdf9 (diff)
downloadqt-creator-b81d3d5cd243282c2a060ea4ea6b35559e4c5e34.tar.gz
ProjectExplorer: Use FileUtils::commonPath instead of strings
Change-Id: I917912fe441d1b72466c02ff9f3e743daa4eff92 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectnodes.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp
index 45f185e568..246b7f767a 100644
--- a/src/plugins/projectexplorer/projectnodes.cpp
+++ b/src/plugins/projectexplorer/projectnodes.cpp
@@ -18,7 +18,6 @@
#include <utils/mimeutils.h>
#include <utils/pointeralgorithm.h>
#include <utils/qtcassert.h>
-#include <utils/stringutils.h>
#include <utils/threadutils.h>
#include <utils/utilsicons.h>
@@ -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<FolderNode *> 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());