ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain

Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-02-18 18:25:26 +01:00
parent 57662de841
commit 3f68292dbe
32 changed files with 97 additions and 103 deletions

View File

@@ -180,7 +180,7 @@ bool IosBuildStep::init()
if (!bc)
emit addTask(Task::buildConfigurationMissingTask());
ToolChain *tc = ToolChainKitAspect::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
ToolChain *tc = ToolChainKitAspect::cxxToolChain(target()->kit());
if (!tc)
emit addTask(Task::compilerMissingTask());
@@ -240,7 +240,7 @@ QStringList IosBuildStep::defaultArguments() const
{
QStringList res;
Kit *kit = target()->kit();
ToolChain *tc = ToolChainKitAspect::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
ToolChain *tc = ToolChainKitAspect::cxxToolChain(kit);
switch (buildConfiguration()->buildType()) {
case BuildConfiguration::Debug :
res << "-configuration" << "Debug";