Commit 33c0b693 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Use algorithm in CMakeBuildStep

Change-Id: I7d3f5e08b15d91759a9c816dd1223bf8be8c40f8
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent e4cdad30
......@@ -49,6 +49,7 @@
#include <coreplugin/find/itemviewfind.h>
#include <utils/algorithm.h>
#include <utils/qtcprocess.h>
#include <utils/pathchooser.h>
......@@ -148,11 +149,9 @@ void CMakeBuildStep::activeBuildConfigurationChanged()
void CMakeBuildStep::buildTargetsChanged()
{
QStringList filteredTargets;
foreach (const QString &t, static_cast<CMakeProject *>(project())->buildTargetTitles()) {
if (m_buildTargets.contains(t))
filteredTargets.append(t);
}
const QStringList filteredTargets
= Utils::filtered(static_cast<CMakeProject *>(project())->buildTargetTitles(),
[this](const QString &s) { return m_buildTargets.contains(s); });
setBuildTargets(filteredTargets);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment