ProjectExplorer: Introduce a ProjectConfiguration::kit() function

For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-09-07 15:56:18 +02:00
parent 552a1296fe
commit 61bfd32438
34 changed files with 82 additions and 79 deletions

View File

@@ -104,7 +104,7 @@ NimCompilerBuildStep::NimCompilerBuildStep(BuildStepList *parentList, Utils::Id
void NimCompilerBuildStep::setupOutputFormatter(OutputFormatter *formatter)
{
formatter->addLineParser(new NimParser);
formatter->addLineParsers(target()->kit()->createOutputParsers());
formatter->addLineParsers(kit()->createOutputParsers());
formatter->addSearchDir(buildDirectory());
AbstractProcessStep::setupOutputFormatter(formatter);
}
@@ -234,8 +234,7 @@ CommandLine NimCompilerBuildStep::commandLine()
auto bc = qobject_cast<NimBuildConfiguration *>(buildConfiguration());
QTC_ASSERT(bc, return {});
Kit *kit = target()->kit();
auto tc = ToolChainKitAspect::toolChain(kit, Constants::C_NIMLANGUAGE_ID);
auto tc = ToolChainKitAspect::toolChain(kit(), Constants::C_NIMLANGUAGE_ID);
QTC_ASSERT(tc, return {});
CommandLine cmd{tc->compilerCommand()};