forked from qt-creator/qt-creator
ToolChainManager: Refactor toolchain restoration
This should be simpler to follow now. Fix autodetection to return not only the newly detected toolchains, but also those that are re-detected (taking their definition from the alreadyKnown list passed to the autodetect method where possible). This avoids running lots of toolchains during start-up, but still enables us to fix QTCREATORBUG-12751 Task-number: QTCREATORBUG-12751 Change-Id: Ie74e7cffb2b014a6132cc8559db232397344f2f1 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -375,10 +375,10 @@ QList<ToolChain *> IosToolChainFactory::autoDetect(const QList<ToolChain *> &exi
|
||||
foreach (const Platform &platform, platforms) {
|
||||
ClangToolChain *toolChain = findToolChainForPlatform(platform, existingClangToolChains);
|
||||
if (!toolChain) {
|
||||
ClangToolChain *newToolChain = createToolChain(platform);
|
||||
toolChains.append(newToolChain);
|
||||
existingClangToolChains.append(newToolChain);
|
||||
toolChain = createToolChain(platform);
|
||||
existingClangToolChains.append(toolChain);
|
||||
}
|
||||
toolChains.append(toolChain);
|
||||
}
|
||||
return Utils::transform(toolChains, [](ClangToolChain *tc) -> ToolChain * { return tc; });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user