forked from qt-creator/qt-creator
ProjectExplorer: Remove foreach / Q_FOREACH usage part 2
Task-number: QTCREATORBUG-27464 Change-Id: Ibfacf5a3b9789a3cf0ea229d1b0d22639101bf9a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -88,7 +88,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
|
||||
parts[0].prepend('/');
|
||||
|
||||
ProjectExplorer::FolderNode *parent = folder;
|
||||
foreach (const QString &part, parts) {
|
||||
for (const QString &part : qAsConst(parts)) {
|
||||
path = path.pathAppended(part);
|
||||
// Find folder in subFolders
|
||||
FolderNode *next = parent->folderNode(path);
|
||||
@@ -352,7 +352,8 @@ FilePath Node::pathOrDirectory(bool dir) const
|
||||
} else {
|
||||
// Otherwise we figure out a commonPath from the subfolders
|
||||
QStringList list;
|
||||
foreach (FolderNode *f, folder->folderNodes())
|
||||
const QList<FolderNode *> folders = folder->folderNodes();
|
||||
for (FolderNode *f : folders)
|
||||
list << f->filePath().toString() + QLatin1Char('/');
|
||||
location = FilePath::fromString(Utils::commonPath(list));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user