CmakeProjectManager: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: Iabe3a621efa56282bf1511f540c98fdf5d8da270
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Artem Sokolovskii
2022-05-18 12:28:04 +02:00
parent 7173bd6190
commit c23aa1c656
6 changed files with 18 additions and 13 deletions

View File

@@ -93,7 +93,7 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools()
const QStringList execs = env.appendExeExtensions(QLatin1String("cmake"));
FilePaths suspects;
foreach (const FilePath &base, path) {
for (const FilePath &base : qAsConst(path)) {
if (base.isEmpty())
continue;
@@ -106,7 +106,7 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools()
}
std::vector<std::unique_ptr<CMakeTool>> found;
foreach (const FilePath &command, suspects) {
for (const FilePath &command : qAsConst(suspects)) {
auto item = std::make_unique<CMakeTool>(CMakeTool::AutoDetection, CMakeTool::createId());
item->setFilePath(command);
item->setDisplayName(CMakeToolManager::tr("System CMake at %1").arg(command.toUserOutput()));