forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/10.0'
Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
This commit is contained in:
@@ -266,9 +266,20 @@ public:
|
||||
|
||||
void expandNode(const QModelIndex &idx)
|
||||
{
|
||||
if (!m_engine)
|
||||
return;
|
||||
|
||||
m_expandedINames.insert(idx.data(LocalsINameRole).toString());
|
||||
if (canFetchMore(idx))
|
||||
fetchMore(idx);
|
||||
if (canFetchMore(idx)) {
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
|
||||
if (auto item = dynamic_cast<ToolTipWatchItem *>(itemForIndex(idx))) {
|
||||
WatchItem *it = m_engine->watchHandler()->findItem(item->iname);
|
||||
if (QTC_GUARD(it))
|
||||
it->model()->fetchMore(it->index());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void collapseNode(const QModelIndex &idx)
|
||||
@@ -276,22 +287,6 @@ public:
|
||||
m_expandedINames.remove(idx.data(LocalsINameRole).toString());
|
||||
}
|
||||
|
||||
void fetchMore(const QModelIndex &idx) override
|
||||
{
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
auto item = dynamic_cast<ToolTipWatchItem *>(itemForIndex(idx));
|
||||
if (!item)
|
||||
return;
|
||||
QString iname = item->iname;
|
||||
if (!m_engine)
|
||||
return;
|
||||
|
||||
WatchItem *it = m_engine->watchHandler()->findItem(iname);
|
||||
QTC_ASSERT(it, return);
|
||||
it->model()->fetchMore(it->index());
|
||||
}
|
||||
|
||||
void restoreTreeModel(QXmlStreamReader &r);
|
||||
|
||||
QPointer<DebuggerEngine> m_engine;
|
||||
|
||||
Reference in New Issue
Block a user