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