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 <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-04-12 17:19:48 +02:00
parent 05324cf21f
commit 4059c27d7a

View File

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