ProjectExplorer: Drop Detection argument from ToolChain constructor

This was used wildly inconsistently. Use a setter instead in
circumstances where the context is reasonably clear.

The assumption is that this will always be done at some time in all
code paths.

Use a new 'Uninitialized' value to avoid triggering the first update.

Change-Id: I82c38cb9da3ccdbd8fbae8beefcbfa0e559ff794
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-08 19:03:15 +02:00
parent 33c4dd8383
commit d116559cd8
25 changed files with 152 additions and 129 deletions

View File

@@ -586,7 +586,8 @@ static ClangToolChain *createToolChain(const XcodePlatform &platform,
&& l != Core::Id(ProjectExplorer::Constants::CXX_LANGUAGE_ID))
return nullptr;
auto toolChain = new ClangToolChain(ToolChain::AutoDetection);
auto toolChain = new ClangToolChain;
toolChain->setDetection(ToolChain::AutoDetection);
toolChain->setLanguage(l);
toolChain->setDisplayName(target.name);
toolChain->setPlatformCodeGenFlags(target.backendFlags);