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()