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)
|
bool RunControl::canRun(Utils::Id runMode, Utils::Id deviceType, Utils::Id runConfigId)
|
||||||
{
|
{
|
||||||
const auto check = std::bind(&RunWorkerFactory::canRun,
|
for (const RunWorkerFactory *factory : qAsConst(g_runWorkerFactories)) {
|
||||||
std::placeholders::_1,
|
if (factory->canRun(runMode, deviceType, runConfigId.toString()))
|
||||||
runMode,
|
return true;
|
||||||
deviceType,
|
}
|
||||||
runConfigId.toString());
|
return false;
|
||||||
return Utils::contains(g_runWorkerFactories, check);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunControlPrivate::initiateStart()
|
void RunControlPrivate::initiateStart()
|
||||||
|
Reference in New Issue
Block a user