forked from qt-creator/qt-creator
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:
@@ -59,7 +59,7 @@ static Q_LOGGING_CATEGORY(mesonBuildSystemLog, "qtc.meson.buildsystem", QtDebugM
|
||||
|
||||
MesonBuildSystem::MesonBuildSystem(MesonBuildConfiguration *bc)
|
||||
: ProjectExplorer::BuildSystem{bc}
|
||||
, m_parser{MesonToolKitAspect::mesonToolId(bc->target()->kit()), bc->environment(), project()}
|
||||
, m_parser{MesonToolKitAspect::mesonToolId(bc->kit()), bc->environment(), project()}
|
||||
{
|
||||
init();
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void MesonBuildSystem::parsingCompleted(bool success)
|
||||
|
||||
ProjectExplorer::Kit *MesonBuildSystem::MesonBuildSystem::kit()
|
||||
{
|
||||
return buildConfiguration()->target()->kit();
|
||||
return buildConfiguration()->kit();
|
||||
}
|
||||
|
||||
QStringList MesonBuildSystem::configArgs(bool isSetup)
|
||||
|
||||
@@ -145,7 +145,7 @@ BuildStepConfigWidget *NinjaBuildStep::createConfigWidget()
|
||||
Utils::CommandLine NinjaBuildStep::command()
|
||||
{
|
||||
Utils::CommandLine cmd = [this] {
|
||||
auto tool = NinjaToolKitAspect::ninjaTool(target()->kit());
|
||||
auto tool = NinjaToolKitAspect::ninjaTool(kit());
|
||||
if (tool)
|
||||
return Utils::CommandLine{tool->exe()};
|
||||
return Utils::CommandLine{};
|
||||
@@ -207,7 +207,7 @@ void NinjaBuildStep::setupOutputFormatter(Utils::OutputFormatter *formatter)
|
||||
m_ninjaParser = new NinjaParser;
|
||||
m_ninjaParser->setSourceDirectory(project()->projectDirectory());
|
||||
formatter->addLineParser(m_ninjaParser);
|
||||
auto additionalParsers = target()->kit()->createOutputParsers();
|
||||
auto additionalParsers = kit()->createOutputParsers();
|
||||
std::for_each(std::cbegin(additionalParsers),
|
||||
std::cend(additionalParsers),
|
||||
[this](const auto parser) { parser->setRedirectionDetector(m_ninjaParser); });
|
||||
|
||||
Reference in New Issue
Block a user