forked from qt-creator/qt-creator
Centralize retrieving the "parent" build configuration
If a step is part of a build configuration, that is used, but many steps can be used as part of a deploy configuration. In that case the active build configuration of the step's target must be used, and that logic was duplicated many times. Instead, let BuildStep::buildConfiguration take care of that logic. For steps that are not offered for deploy configurations there is no semantic difference, and for the others this removes code duplication. Change-Id: I02f3bb50226590092cedcec02fce6fde9c7c6e63 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -82,8 +82,6 @@ void MakeStep::setClean(bool clean)
|
||||
bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
{
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
if (!bc)
|
||||
bc = target()->activeBuildConfiguration();
|
||||
if (!bc)
|
||||
emit addTask(Task::buildConfigurationMissingTask());
|
||||
|
||||
@@ -227,8 +225,6 @@ QString MakeStepConfigWidget::summaryText() const
|
||||
void MakeStepConfigWidget::updateDetails()
|
||||
{
|
||||
BuildConfiguration *bc = m_makeStep->buildConfiguration();
|
||||
if (!bc)
|
||||
bc = m_makeStep->target()->activeBuildConfiguration();
|
||||
QList<ToolChain *> tcList = ToolChainKitInformation::toolChains(m_makeStep->target()->kit());
|
||||
|
||||
if (!tcList.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user