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)
fl->setContentsMargins(0, -1, 0, -1);
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
m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true);
......@@ -493,9 +500,15 @@ QString GenericBuildSettingsWidget::displayName() const
void GenericBuildSettingsWidget::init(BuildConfiguration *bc)
{
m_buildConfiguration = static_cast<GenericBuildConfiguration *>(bc);
m_nameLineEdit->setText(m_buildConfiguration->displayName());
m_pathChooser->setPath(m_buildConfiguration->buildDirectory());
}
void GenericBuildSettingsWidget::configNameEdited(QString name)
{
m_buildConfiguration->setDisplayName(name);
}
void GenericBuildSettingsWidget::buildDirectoryChanged()
{
m_buildConfiguration->setBuildDirectory(m_pathChooser->path());
......
......@@ -42,6 +42,8 @@
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h>
#include <QtGui/QLineEdit>
namespace Utils {
class PathChooser;
}
......@@ -181,11 +183,13 @@ public:
virtual void init(ProjectExplorer::BuildConfiguration *bc);
private Q_SLOTS:
void configNameEdited(QString name);
void buildDirectoryChanged();
void toolChainSelected(int index);
private:
GenericProject *m_project;
QLineEdit *m_nameLineEdit;
Utils::PathChooser *m_pathChooser;
GenericBuildConfiguration *m_buildConfiguration;
};
......
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