From e62f7cee3c7f88aef8cb34e2a4f5dec9e44ffb34 Mon Sep 17 00:00:00 2001 From: dt <qtc-committer@nokia.com> Date: Mon, 5 Oct 2009 18:32:44 +0200 Subject: [PATCH] Display the name of custom process stesps on the project pane. --- src/plugins/projectexplorer/processstep.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp index a4d46bdd27f..15c5b0d17ac 100644 --- a/src/plugins/projectexplorer/processstep.cpp +++ b/src/plugins/projectexplorer/processstep.cpp @@ -71,7 +71,10 @@ QString ProcessStep::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() @@ -148,8 +151,12 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step) void ProcessStepConfigWidget::updateDetails() { - m_summaryText = tr("<b>Process Step</b> %1 %2 %3") - .arg(m_step->command(m_buildConfiguration), + QString displayName = m_step->displayName(); + 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->enabled(m_buildConfiguration) ? "" : tr("(disabled)")); emit updateSummary(); @@ -186,6 +193,7 @@ QString ProcessStepConfigWidget::summaryText() const void ProcessStepConfigWidget::nameLineEditTextEdited() { m_step->setDisplayName(m_ui.nameLineEdit->text()); + emit updateDetails(); } void ProcessStepConfigWidget::commandLineEditTextEdited() -- GitLab