summaryrefslogtreecommitdiff
path: root/src/plugins/qbsprojectmanager
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-08-02 13:59:21 +0200
committerhjk <hjk@qt.io>2019-08-02 13:59:31 +0000
commit16b9a47e83b9c4fcf4fa9179f1df6f7a3895ef41 (patch)
treecf25a9ecd68c7337facb9465951d6443986c9fbf /src/plugins/qbsprojectmanager
parentcd1338cc302ac54b16fd04e8fcac56dc2c03bf8f (diff)
downloadqt-creator-16b9a47e83b9c4fcf4fa9179f1df6f7a3895ef41.tar.gz
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>
Diffstat (limited to 'src/plugins/qbsprojectmanager')
-rw-r--r--src/plugins/qbsprojectmanager/qbsproject.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index 1418147d80..f9607429e7 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -146,11 +146,9 @@ QbsProject::QbsProject(const FilePath &fileName) :
}
m_qbsProjects.erase(it);
});
- auto delayedParsing = [this]() {
- if (static_cast<ProjectConfiguration *>(sender())->isActive())
- delayParsing();
- };
- subscribeSignal(&Target::activeBuildConfigurationChanged, this, delayedParsing);
+
+ connect(this, &Project::activeBuildConfigurationChanged,
+ this, &QbsProject::delayParsing);
connect(&m_parsingDelay, &QTimer::timeout, this, &QbsProject::startParsing);
}