Qbs: Clean up clean step ui

Change-Id: Ic4ba17239d8910f5141eceed3f50d713ac3906cd
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
Tobias Hunger
2013-04-12 17:26:29 +02:00
committed by Christian Kandeler
parent e4873318a2
commit 618f737302
2 changed files with 23 additions and 43 deletions

View File

@@ -264,7 +264,6 @@ QbsCleanStepConfigWidget::QbsCleanStepConfigWidget(QbsCleanStep *step) :
this, SLOT(changeCleanAll(bool)));
connect(m_ui->dryRunCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeDryRun(bool)));
connect(m_ui->keepGoingCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeKeepGoing(bool)));
connect(m_ui->jobSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeJobCount(int)));
updateState();
}
@@ -284,17 +283,12 @@ void QbsCleanStepConfigWidget::updateState()
m_ui->cleanAllCheckBox->setChecked(m_step->cleanAll());
m_ui->dryRunCheckBox->setChecked(m_step->dryRun());
m_ui->keepGoingCheckBox->setChecked(m_step->keepGoing());
m_ui->jobSpinBox->setValue(m_step->maxJobs());
qbs::BuildOptions defaultOptions;
QString command = QLatin1String("qbs clean ");
if (m_step->dryRun())
command += QLatin1String("--dry-run ");
if (m_step->keepGoing())
command += QLatin1String("--keep-going ");
if (m_step->maxJobs() != defaultOptions.maxJobCount)
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
if (m_step->cleanAll())
command += QLatin1String(" --all-artifacts");