Merge remote-tracking branch 'origin/10.0'

Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
This commit is contained in:
Eike Ziller
2023-05-11 10:33:18 +02:00
19 changed files with 185 additions and 75 deletions

View File

@@ -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;