Commit 16f27124 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Use PathChooser in MakeStep config widget

TaskNumber: QTCREATORBUG-2479
Reviewed-by: Robert Loehning
parent ea4b64de
......@@ -238,7 +238,11 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
: BuildStepConfigWidget(), m_ui(new Ui::MakeStep), m_makeStep(makeStep), m_ignoreChange(false)
{
m_ui->setupUi(this);
connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)),
m_ui->makePathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath());
connect(m_ui->makePathChooser, SIGNAL(editingFinished()),
this, SLOT(makeEdited()));
connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEdited()));
......@@ -336,7 +340,7 @@ void MakeStepConfigWidget::init()
updateMakeOverrideLabel();
const QString &makeCmd = m_makeStep->m_makeCmd;
m_ui->makeLineEdit->setText(makeCmd);
m_ui->makePathChooser->setPath(makeCmd);
const QStringList &makeArguments = m_makeStep->userArguments();
m_ui->makeArgumentsLineEdit->setText(Utils::Environment::joinArgumentList(makeArguments));
......@@ -345,7 +349,7 @@ void MakeStepConfigWidget::init()
void MakeStepConfigWidget::makeEdited()
{
m_makeStep->m_makeCmd = m_ui->makeLineEdit->text();
m_makeStep->m_makeCmd = m_ui->makePathChooser->rawPath();
updateDetails();
}
......
......@@ -11,18 +11,14 @@
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="makeLabel">
<property name="text">
<string>Override %1:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="makeLineEdit"/>
<widget class="Utils::PathChooser" name="makePathChooser"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="makeArgumentsLabel">
......@@ -34,8 +30,22 @@
<item row="1" column="1">
<widget class="QLineEdit" name="makeArgumentsLineEdit"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="makeLabel">
<property name="text">
<string>Override %1:</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QLineEdit</extends>
<header>utils/pathchooser.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
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