aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/targetsettingspanel.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-02-07 08:53:00 +0100
committerhjk <hjk@qt.io>2017-02-08 16:08:42 +0000
commit196dbbe0e75618263d110baf5bc0e7d4519d7c8e (patch)
tree47a0bd73a268ada14f00e59aa8e5896f067096ae /src/plugins/projectexplorer/targetsettingspanel.cpp
parentaf54ab960a517b5d21ca327e6c47ca70459bd32a (diff)
Utils: Introduce TreeItem::{begin,end}
... and use this to reduce the number of explicit uses of m_children. Despite of being shorter code by itself it is a step towards having an explicit LeafItem object that doesn't explicitly store a(n empty) vector of child nodes. Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/targetsettingspanel.cpp')
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index f7ccbf62e8..65780a6d35 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -386,7 +386,7 @@ public:
if (role == ItemActivatedFromBelowRole) {
// I.e. 'Build' and 'Run' items were present and user clicked on them.
- int child = children().indexOf(data.value<TreeItem *>());
+ int child = indexOf(data.value<TreeItem *>());
QTC_ASSERT(child != -1, return false);
m_currentChild = child; // Triggered from sub-item.
SessionManager::setActiveTarget(m_project, target(), SetActive::Cascade);
@@ -788,7 +788,7 @@ void TargetGroupItemPrivate::handleAddedKit(Kit *kit)
void TargetItem::updateSubItems()
{
- if (children().isEmpty() && isEnabled())
+ if (childCount() == 0 && isEnabled())
m_currentChild = DefaultPage; // We will add children below.
removeChildren();
if (isEnabled()) {