forked from qt-creator/qt-creator
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:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user