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