forked from qt-creator/qt-creator
ProjectExplorer: Use FileUtils::commonPath instead of strings
Change-Id: I917912fe441d1b72466c02ff9f3e743daa4eff92 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user