Commit 618f7373 authored by Tobias Hunger's avatar Tobias Hunger Committed by Christian Kandeler

Qbs: Clean up clean step ui

Change-Id: Ic4ba17239d8910f5141eceed3f50d713ac3906cd
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent e4873318
......@@ -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");
......
......@@ -6,11 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>59</height>
<width>311</width>
<height>20</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="cleanAllCheckBox">
<property name="text">
......@@ -19,43 +31,17 @@
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<widget class="QCheckBox" name="dryRunCheckBox">
<property name="text">
<string>Dry run</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</widget>
</item>
<item>
<widget class="QCheckBox" name="keepGoingCheckBox">
<property name="text">
<string>Keep Going</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="dryRunCheckBox">
<property name="text">
<string>Dry run</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="keepGoingCheckBox">
<property name="text">
<string>Keep Going</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="jobSpinBox"/>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>jobs</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
......
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