ProjectExplorer: Move BuildStepWidget::summary etc to BuildStep

The step is the source of information anyway, and available at the
only place of use. No need to copy that over to the widget, neither
for keeping it up-to-date there when the mechanism is already
available in the step itself.

This creates quite some potential for the simplification of
the various createConfigWidget implementations in follow-up patches.

Change-Id: I4474665f194a1ff7c5792ad086ed53c8d3ce13e6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-09-14 12:37:32 +02:00
parent ad7dbc4619
commit b97b7dc6f2
16 changed files with 58 additions and 87 deletions

View File

@@ -235,11 +235,11 @@ BuildStepConfigWidget *IosDeployStep::createConfigWidget()
auto widget = new BuildStepConfigWidget(this);
widget->setObjectName("IosDeployStepWidget");
widget->setDisplayName(QString("<b>%1</b>").arg(displayName()));
widget->setSummaryText(widget->displayName());
setDisplayName(QString("<b>%1</b>").arg(displayName()));
setSummaryText(displayName());
connect(this, &ProjectConfiguration::displayNameChanged,
widget, &BuildStepConfigWidget::updateSummary);
this, &BuildStep::updateSummary);
return widget;
}