QbsProjectManager: Fix command-line representations.

- All except the one for "qbs build" were incomplete, which is fixed
  now.
- The new implementation is centralized, so maintenance will be simpler.
- The command lines are also completely self-contained now, so they can
  be pasted as-is into a shell with no assumptions about the working
  directory etc.

Change-Id: I2c684141bcdc5c6da0e1af60ce60278fc4dcd088
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This commit is contained in:
Christian Kandeler
2015-01-30 13:52:46 +01:00
parent aa39916c41
commit c356a276ec
5 changed files with 133 additions and 34 deletions

View File

@@ -293,13 +293,7 @@ void QbsCleanStepConfigWidget::updateState()
m_ui->dryRunCheckBox->setChecked(m_step->dryRun());
m_ui->keepGoingCheckBox->setChecked(m_step->keepGoing());
QString command = QLatin1String("qbs clean ");
if (m_step->dryRun())
command += QLatin1String("--dry-run ");
if (m_step->keepGoing())
command += QLatin1String("--keep-going ");
if (m_step->cleanAll())
command += QLatin1String(" --all-artifacts");
QString command = QbsBuildConfiguration::equivalentCommandLine(m_step);
m_ui->commandLineTextEdit->setPlainText(command);
QString summary = tr("<b>Qbs:</b> %1").arg(command);