diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-08-16 17:45:16 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-08-28 11:41:38 +0200 |
commit | a7bb77288d28160daabbc00179e77736886ce8d2 (patch) | |
tree | 04dcfc73f09e702e0597f9b1c8ff05313dc50f5c /src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp | |
parent | 52a41ecb0c455b9979b2a55cc5f96b078b696996 (diff) | |
download | qt-creator-a7bb77288d28160daabbc00179e77736886ce8d2.tar.gz |
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>
Diffstat (limited to 'src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp')
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp index b6f6c90743..45e6135718 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfigurationwidget.cpp @@ -31,6 +31,8 @@ #include "qbsbuildconfiguration.h" +#include <projectexplorer/target.h> +#include <projectexplorer/project.h> #include <utils/detailswidget.h> #include <utils/pathchooser.h> @@ -45,8 +47,8 @@ QbsBuildConfigurationWidget::QbsBuildConfigurationWidget(QbsProjectManager::Inte m_buildConfiguration(bc), m_ignoreChange(false) { - connect(m_buildConfiguration, SIGNAL(buildDirectoryChanged()), - this, SLOT(buildDirectoryChanged())); + connect(bc, SIGNAL(buildDirectoryChanged()), this, SLOT(buildDirectoryChanged())); + connect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentHasChanged())); QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); @@ -63,6 +65,8 @@ QbsBuildConfigurationWidget::QbsBuildConfigurationWidget(QbsProjectManager::Inte m_buildDirChooser = new Utils::PathChooser; m_buildDirChooser->setExpectedKind(Utils::PathChooser::Directory); + m_buildDirChooser->setBaseDirectory(bc->target()->project()->projectDirectory()); + m_buildDirChooser->setEnvironment(bc->environment()); layout->addWidget(m_buildDirChooser, 0, 1); connect(m_buildDirChooser, SIGNAL(changed(QString)), this, SLOT(buildDirEdited())); @@ -81,7 +85,12 @@ void QbsBuildConfigurationWidget::buildDirectoryChanged() if (m_ignoreChange) return; - m_buildDirChooser->setPath(m_buildConfiguration->buildDirectory()); + m_buildDirChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString()); +} + +void QbsBuildConfigurationWidget::environmentHasChanged() +{ + m_buildDirChooser->setEnvironment(m_buildConfiguration->environment()); } } // namespace Internal |