From 4059c27d7a1b0fbe660f45e97ed29d9a33825b94 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 12 Apr 2021 17:19:48 +0200 Subject: [PATCH] ProjectExplorer: Use manual loop in RunControl::canRun() implementation I find the std::bind version much harder to debug. Change-Id: I0badb4c29097a5432b110a815cb2206477091d98 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/runcontrol.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 7c6e50b5152..bbde5b4f66b 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -494,12 +494,11 @@ bool RunControl::createMainWorker() bool RunControl::canRun(Utils::Id runMode, Utils::Id deviceType, Utils::Id runConfigId) { - const auto check = std::bind(&RunWorkerFactory::canRun, - std::placeholders::_1, - runMode, - deviceType, - runConfigId.toString()); - return Utils::contains(g_runWorkerFactories, check); + for (const RunWorkerFactory *factory : qAsConst(g_runWorkerFactories)) { + if (factory->canRun(runMode, deviceType, runConfigId.toString())) + return true; + } + return false; } void RunControlPrivate::initiateStart()