BC: Move builddirectory handling into BC itself

Use setBuildDirectory() in the different BuildConfigurations instead
of reimplementing that over and over again.

Change-Id: Ic355fdb4624c71667ce470b3e2865c9a8722ef09
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-08-16 17:45:16 +02:00
parent 52a41ecb0c
commit a7bb77288d
43 changed files with 212 additions and 268 deletions

View File

@@ -59,15 +59,24 @@ AutotoolsBuildSettingsWidget::AutotoolsBuildSettingsWidget(AutotoolsBuildConfigu
m_pathChooser = new Utils::PathChooser(this);
m_pathChooser->setEnabled(true);
m_pathChooser->setExpectedKind(Utils::PathChooser::Directory);
m_pathChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
m_pathChooser->setEnvironment(bc->environment());
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
m_pathChooser->setBaseDirectory(bc->target()->project()->projectDirectory());
m_pathChooser->setPath(m_buildConfiguration->buildDirectory());
m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString());
setDisplayName(tr("Autotools Manager"));
connect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentHasChanged()));
}
void AutotoolsBuildSettingsWidget::buildDirectoryChanged()
{
m_buildConfiguration->setBuildDirectory(m_pathChooser->rawPath());
m_buildConfiguration->setBuildDirectory(Utils::FileName::fromString(m_pathChooser->rawPath()));
}
void AutotoolsBuildSettingsWidget::environmentHasChanged()
{
m_pathChooser->setEnvironment(m_buildConfiguration->environment());
}