aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index b68185fdfa2..62bf4646f0d 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -611,6 +611,14 @@ public:
&m_guard,
[this] { m_vanishedTargetsItem->rebuild(); },
Qt::QueuedConnection /* this is triggered by a child item, so queue */);
+
+ QObject::connect(project, &Project::removedTarget, &m_guard, [this] {
+ announceChange();
+ });
+
+ QObject::connect(project, &Project::activeTargetChanged, &m_guard, [this] {
+ announceChange();
+ });
}
QVariant data(int column, int role) const final
@@ -1062,15 +1070,6 @@ TargetGroupItem::TargetGroupItem(Project *project)
{
QObject::connect(project, &Project::addedTarget, &m_guard, [this] { update(); });
- QObject::connect(project, &Project::removedTarget, &m_guard, [this] {
- QTC_ASSERT(parent(), return);
- parent()->itemDeactivatedFromBelow();
- });
-
- QObject::connect(project, &Project::activeTargetChanged, &m_guard, [this] {
- parent()->itemActivatedFromBelow(this);
- });
-
// force a signal since the index has changed
QObject::connect(KitManager::instance(), &KitManager::kitAdded, &m_guard, [this](Kit *kit) {
appendChild(new TargetItem(m_project, kit->id(), m_project->projectIssues(kit)));