ProjectExplorer: Replace Project::projectConfigurationChanged

... by a Project::buildConfigurationChanged. That's the only case
used, and saves filtering on the receiver side. Also, the passed
bc is (in non-null) the active one, so isActive checks are not
necessary.

The null case seems to be only possible to trigger when removing
the currently active build configuration manually i.e. happens rarely,
so having it trigger an unneeded final display update on the dying
build config is tolerable, so drop the null check in such cases
to achieve a more uniform pattern.

Change-Id: I46f72e9e277767214dbd6920dd86b026a7084f46
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-08-02 13:59:21 +02:00
parent cd1338cc30
commit 16b9a47e83
10 changed files with 28 additions and 74 deletions

View File

@@ -123,11 +123,9 @@ public:
this, &IosBuildStepConfigWidget::updateDetails);
Project *pro = m_buildStep->target()->project();
connect(pro, &Project::activeProjectConfigurationChanged,
this, [this](ProjectConfiguration *pc) {
if (pc && pc->isActive())
updateDetails();
});
connect(pro, &Project::activeBuildConfigurationChanged,
this, &IosBuildStepConfigWidget::updateDetails);
connect(pro, &Project::activeTargetChanged, this, [this](Target *target) {
if (target && target->isActive())
updateDetails();