Skip to content
Snippets Groups Projects
Commit 8b97b66e authored by Olli Werwolff's avatar Olli Werwolff
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 7a7d5dfd b655c31b
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>389</width>
<width>403</width>
<height>183</height>
</rect>
</property>
......@@ -25,16 +25,16 @@
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="pathlabel">
<property name="text">
<string>PATH:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="pathlabel">
<property name="text">
<string>PATH:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pathLineEdit"/>
</item>
......@@ -47,19 +47,23 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="noteLabel">
<property name="text">
<string>&lt;b&gt;Note:&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="noteFieldlabel">
<property name="text">
<string>Git needs to find Perl in the environment as well.</string>
</property>
</widget>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="noteLabel">
<property name="text">
<string>&lt;b&gt;Note:&lt;/b&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="noteFieldlabel">
<property name="text">
<string>Git needs to find Perl in the environment as well.</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
......
......@@ -136,17 +136,14 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
: m_step(step)
{
m_ui.setupUi(this);
connect(m_ui.commandBrowseButton, SIGNAL(clicked(bool)),
this, SLOT(commandBrowseButtonClicked()));
connect(m_ui.workingDirBrowseButton, SIGNAL(clicked(bool)),
this, SLOT(workingDirBrowseButtonClicked()));
m_ui.command->setExpectedKind(Core::Utils::PathChooser::File);
connect(m_ui.command, SIGNAL(changed()),
this, SLOT(commandLineEditTextEdited()));
connect(m_ui.workingDirectory, SIGNAL(changed()),
this, SLOT(workingDirectoryLineEditTextEdited()));
connect(m_ui.nameLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(nameLineEditTextEdited()));
connect(m_ui.commandLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(commandLineEditTextEdited()));
connect(m_ui.workingDirectoryLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(workingDirectoryLineEditTextEdited()));
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(commandArgumentsLineEditTextEdited()));
connect(m_ui.enabledGroupBox, SIGNAL(clicked(bool)),
......@@ -158,34 +155,16 @@ QString ProcessStepConfigWidget::displayName() const
return m_step->name();
}
void ProcessStepConfigWidget::workingDirBrowseButtonClicked()
{
QString workingDirectory = QFileDialog::getExistingDirectory(this, "Select the working directory", m_ui.workingDirectoryLineEdit->text());
if (workingDirectory.isEmpty())
return;
m_ui.workingDirectoryLineEdit->setText(workingDirectory);
workingDirectoryLineEditTextEdited();
}
void ProcessStepConfigWidget::commandBrowseButtonClicked()
{
QString filename = QFileDialog::getOpenFileName(this, "Select the executable");
if (filename.isEmpty())
return;
m_ui.commandLineEdit->setText(filename);
commandLineEditTextEdited();
}
void ProcessStepConfigWidget::init(const QString &buildConfiguration)
{
m_buildConfiguration = buildConfiguration;
if (buildConfiguration != QString::null) {
m_ui.commandLineEdit->setText(m_step->command(buildConfiguration));
m_ui.command->setPath(m_step->command(buildConfiguration));
QString workingDirectory = m_step->value(buildConfiguration, "workingDirectory").toString();
if (workingDirectory.isEmpty())
workingDirectory = "$BUILDDIR";
m_ui.workingDirectoryLineEdit->setText(workingDirectory);
m_ui.workingDirectory->setPath(workingDirectory);
m_ui.commandArgumentsLineEdit->setText(m_step->arguments(buildConfiguration).join(" "));
m_ui.enabledGroupBox->setChecked(m_step->enabled(buildConfiguration));
......@@ -200,12 +179,12 @@ void ProcessStepConfigWidget::nameLineEditTextEdited()
void ProcessStepConfigWidget::commandLineEditTextEdited()
{
m_step->setCommand(m_buildConfiguration, m_ui.commandLineEdit->text());
m_step->setCommand(m_buildConfiguration, m_ui.command->path());
}
void ProcessStepConfigWidget::workingDirectoryLineEditTextEdited()
{
QString wd = m_ui.workingDirectoryLineEdit->text();
QString wd = m_ui.workingDirectory->path();
m_step->setValue(m_buildConfiguration, "workingDirectory", wd);
}
......
......@@ -84,8 +84,6 @@ private slots:
void workingDirectoryLineEditTextEdited();
void commandArgumentsLineEditTextEdited();
void enabledGroupBoxClicked(bool);
void workingDirBrowseButtonClicked();
void commandBrowseButtonClicked();
private:
QString m_buildConfiguration;
ProcessStep *m_step;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>428</width>
<height>222</height>
<width>505</width>
<height>271</height>
</rect>
</property>
<property name="windowTitle">
......@@ -22,61 +22,50 @@
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLabel" name="commandLabel">
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Command</string>
<string>Name:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="commandLineEdit"/>
<item row="0" column="1">
<widget class="QLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="2">
<widget class="QToolButton" name="commandBrowseButton">
<item row="1" column="0">
<widget class="QLabel" name="commandLabel">
<property name="text">
<string>...</string>
<string>Command:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Core::Utils::PathChooser" name="command"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="workingDirecoryLabel">
<property name="text">
<string>Working Directory</string>
<string>Working Directory:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="workingDirectoryLineEdit"/>
</item>
<item row="2" column="2">
<widget class="QToolButton" name="workingDirBrowseButton">
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="Core::Utils::PathChooser" name="workingDirectory"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="commandArgumentsLabel">
<property name="text">
<string>command arguments</string>
<string>Command Arguments:</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<item row="3" column="1">
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="nameLineEdit"/>
</item>
</layout>
</widget>
</item>
......@@ -95,6 +84,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Core::Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -22,7 +22,7 @@
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Configuration Name</string>
<string>Configuration Name:</string>
</property>
</widget>
</item>
......@@ -45,7 +45,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Qt Version</string>
<string>Qt Version:</string>
</property>
</widget>
</item>
......@@ -93,7 +93,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Shadow Build</string>
<string>Shadow Build:</string>
</property>
</widget>
</item>
......@@ -113,7 +113,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Build Directory</string>
<string>Build Directory:</string>
</property>
</widget>
</item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment