projectexplorer: fix target buildDirectoryChanged signal

Change-Id: Ie46371cac2d345411247c1d2035ee2d5f3b8c00a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-12-16 13:30:52 +01:00
parent 869c46a02b
commit b1e871e9b0
2 changed files with 3 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ void Target::changeRunConfigurationEnabled()
void Target::onBuildDirectoryChanged() void Target::onBuildDirectoryChanged()
{ {
BuildConfiguration *bc = qobject_cast<BuildConfiguration *>(sender()); BuildConfiguration *bc = qobject_cast<BuildConfiguration *>(sender());
if (bc) if (bc && activeBuildConfiguration() == bc)
emit buildDirectoryChanged(); emit buildDirectoryChanged();
} }
@@ -238,6 +238,8 @@ void Target::addBuildConfiguration(BuildConfiguration *configuration)
SLOT(changeEnvironment())); SLOT(changeEnvironment()));
connect(configuration, SIGNAL(enabledChanged()), connect(configuration, SIGNAL(enabledChanged()),
this, SLOT(changeBuildConfigurationEnabled())); this, SLOT(changeBuildConfigurationEnabled()));
connect(configuration, SIGNAL(buildDirectoryChanged()),
SLOT(onBuildDirectoryChanged()));
if (!activeBuildConfiguration()) if (!activeBuildConfiguration())
setActiveBuildConfiguration(configuration); setActiveBuildConfiguration(configuration);

View File

@@ -65,7 +65,6 @@ QbsBuildConfiguration::QbsBuildConfiguration(ProjectExplorer::Target *target) :
connect(project(), SIGNAL(projectParsingStarted()), this, SIGNAL(enabledChanged())); connect(project(), SIGNAL(projectParsingStarted()), this, SIGNAL(enabledChanged()));
connect(project(), SIGNAL(projectParsingDone(bool)), this, SIGNAL(enabledChanged())); connect(project(), SIGNAL(projectParsingDone(bool)), this, SIGNAL(enabledChanged()));
connect(this, SIGNAL(buildDirectoryChanged()), target, SLOT(onBuildDirectoryChanged()));
ProjectExplorer::BuildStepList *bsl ProjectExplorer::BuildStepList *bsl
= stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)); = stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
connect(bsl, SIGNAL(stepInserted(int)), this, SLOT(buildStepInserted(int))); connect(bsl, SIGNAL(stepInserted(int)), this, SLOT(buildStepInserted(int)));