diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 4a42a65633f2718a8fd6f244c244c80c1887ea07..6fa06af26ecbe4c89139979bd0964d50d56a05cb 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -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(); } diff --git a/src/plugins/qt4projectmanager/makestep.ui b/src/plugins/qt4projectmanager/makestep.ui index 1dfff96f279ba078dea19c0ddcda45b41c135bf1..015936f46ce188f4f93b820a2ccf83e1b20cafc2 100644 --- a/src/plugins/qt4projectmanager/makestep.ui +++ b/src/plugins/qt4projectmanager/makestep.ui @@ -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>