Commit 6c4c8b8a authored by hjk's avatar hjk

Debugger: Remove cache of fetched item names in Locals Views

This was originally present to prevent multiple evaluations of
the same items when using GDB/MI varobjs. This also prevented
a proper update of child item count. Until recently this did
not negatively affect the GUI due to excessive use of reset()
in the view. This has changed, so the missing update was visible now,
solved here by removing the cache, which is not needed anyways,
since we don't use varobjs anymore.

Task-number: QTCREATORBUG-14705
Change-Id: I3bbcd0525f02c10765f20be3a55708835747b307
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent db6126b8
......@@ -301,7 +301,6 @@ public:
SeparatedView *m_separatedView; // Not owned.
QSet<QByteArray> m_expandedINames;
QSet<QByteArray> m_fetchTriggered;
QTimer m_requestUpdateTimer;
QHash<QString, DisplayFormats> m_reportedTypeFormats; // Type name -> Dumper Formats
......@@ -670,17 +669,13 @@ bool WatchItem::canFetchMore() const
return false;
if (!model->m_contentsValid && !isInspect())
return false;
return !model->m_fetchTriggered.contains(iname);
return true;
}
void WatchItem::fetchMore()
{
WatchModel *model = watchModel();
if (model->m_fetchTriggered.contains(iname))
return;
model->m_expandedINames.insert(iname);
model->m_fetchTriggered.insert(iname);
if (children().isEmpty()) {
setChildrenNeeded();
model->m_engine->expandItem(iname);
......@@ -1177,6 +1172,8 @@ void WatchModel::insertItem(WatchItem *item)
if (!found)
parent->appendChild(item);
item->update();
item->walkTree([this](TreeItem *sub) { showEditValue(static_cast<WatchItem *>(sub)); });
}
......@@ -1665,7 +1662,6 @@ QString WatchHandler::editorContents()
void WatchHandler::scheduleResetLocation()
{
m_model->m_fetchTriggered.clear();
m_model->m_contentsValid = false;
m_model->m_resetLocationScheduled = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment