Commit e62f7cee authored by dt's avatar dt
Browse files

Display the name of custom process stesps on the project pane.

parent 10f94d67
...@@ -71,7 +71,10 @@ QString ProcessStep::name() ...@@ -71,7 +71,10 @@ QString ProcessStep::name()
void ProcessStep::setDisplayName(const QString &name) void ProcessStep::setDisplayName(const QString &name)
{ {
setValue("ProjectExplorer.ProcessStep.DisplayName", name); if (name.isEmpty())
setValue("ProjectExplorer.ProcessStep.DisplayName", QVariant());
else
setValue("ProjectExplorer.ProcessStep.DisplayName", name);
} }
QString ProcessStep::displayName() QString ProcessStep::displayName()
...@@ -148,8 +151,12 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step) ...@@ -148,8 +151,12 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
void ProcessStepConfigWidget::updateDetails() void ProcessStepConfigWidget::updateDetails()
{ {
m_summaryText = tr("<b>Process Step</b> %1 %2 %3") QString displayName = m_step->displayName();
.arg(m_step->command(m_buildConfiguration), if (displayName.isEmpty())
displayName = "Custom Process Step";
m_summaryText = tr("<b>%1</b> %2 %3 %4")
.arg(displayName,
m_step->command(m_buildConfiguration),
m_step->arguments(m_buildConfiguration).join(" "), m_step->arguments(m_buildConfiguration).join(" "),
m_step->enabled(m_buildConfiguration) ? "" : tr("(disabled)")); m_step->enabled(m_buildConfiguration) ? "" : tr("(disabled)"));
emit updateSummary(); emit updateSummary();
...@@ -186,6 +193,7 @@ QString ProcessStepConfigWidget::summaryText() const ...@@ -186,6 +193,7 @@ QString ProcessStepConfigWidget::summaryText() const
void ProcessStepConfigWidget::nameLineEditTextEdited() void ProcessStepConfigWidget::nameLineEditTextEdited()
{ {
m_step->setDisplayName(m_ui.nameLineEdit->text()); m_step->setDisplayName(m_ui.nameLineEdit->text());
emit updateDetails();
} }
void ProcessStepConfigWidget::commandLineEditTextEdited() void ProcessStepConfigWidget::commandLineEditTextEdited()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment