Commit 5f9e4c7e authored by Laurent Desmecht's avatar Laurent Desmecht Committed by Thorbjørn Lindeijer
Browse files

Allow modification of the configuration name in GenericBuildSettingsWidget



Merge-request: 117
Reviewed-by: default avatarThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
parent e7e6b1bd
...@@ -460,6 +460,13 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project) ...@@ -460,6 +460,13 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
fl->setContentsMargins(0, -1, 0, -1); fl->setContentsMargins(0, -1, 0, -1);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
// Configuration name
m_nameLineEdit = new QLineEdit();
fl->addRow(tr("Configuration Name:"), m_nameLineEdit);
connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(configNameEdited(QString)));
// build directory // build directory
m_pathChooser = new Utils::PathChooser(this); m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true); m_pathChooser->setEnabled(true);
...@@ -493,9 +500,15 @@ QString GenericBuildSettingsWidget::displayName() const ...@@ -493,9 +500,15 @@ QString GenericBuildSettingsWidget::displayName() const
void GenericBuildSettingsWidget::init(BuildConfiguration *bc) void GenericBuildSettingsWidget::init(BuildConfiguration *bc)
{ {
m_buildConfiguration = static_cast<GenericBuildConfiguration *>(bc); m_buildConfiguration = static_cast<GenericBuildConfiguration *>(bc);
m_nameLineEdit->setText(m_buildConfiguration->displayName());
m_pathChooser->setPath(m_buildConfiguration->buildDirectory()); m_pathChooser->setPath(m_buildConfiguration->buildDirectory());
} }
void GenericBuildSettingsWidget::configNameEdited(QString name)
{
m_buildConfiguration->setDisplayName(name);
}
void GenericBuildSettingsWidget::buildDirectoryChanged() void GenericBuildSettingsWidget::buildDirectoryChanged()
{ {
m_buildConfiguration->setBuildDirectory(m_pathChooser->path()); m_buildConfiguration->setBuildDirectory(m_pathChooser->path());
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h> #include <coreplugin/ifile.h>
#include <QtGui/QLineEdit>
namespace Utils { namespace Utils {
class PathChooser; class PathChooser;
} }
...@@ -181,11 +183,13 @@ public: ...@@ -181,11 +183,13 @@ public:
virtual void init(ProjectExplorer::BuildConfiguration *bc); virtual void init(ProjectExplorer::BuildConfiguration *bc);
private Q_SLOTS: private Q_SLOTS:
void configNameEdited(QString name);
void buildDirectoryChanged(); void buildDirectoryChanged();
void toolChainSelected(int index); void toolChainSelected(int index);
private: private:
GenericProject *m_project; GenericProject *m_project;
QLineEdit *m_nameLineEdit;
Utils::PathChooser *m_pathChooser; Utils::PathChooser *m_pathChooser;
GenericBuildConfiguration *m_buildConfiguration; GenericBuildConfiguration *m_buildConfiguration;
}; };
......
Supports Markdown
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