DAP: Fix highlighting changed variables

Change-Id: Idae543ba3af1a7c02c22d6619857cf0cf8b04f28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-10-02 16:06:03 +02:00
parent 64870f9163
commit a1ac447d90

View File

@@ -633,6 +633,7 @@ void DapEngine::handleScopesResponse(const QJsonObject &response)
if (!response.value("success").toBool())
return;
watchHandler()->resetValueCache();
watchHandler()->notifyUpdateStarted();
QJsonArray scopes = response.value("body").toObject().value("scopes").toArray();
@@ -832,10 +833,12 @@ void DapEngine::refreshLocals(const QJsonArray &variables)
watchHandler()->insertItem(item);
}
QModelIndex idx = watchHandler()->model()->indexForItem(currentItem);
if (currentItem && idx.isValid() && idx.data(LocalsExpandedRole).toBool()) {
emit watchHandler()->model()->inameIsExpanded(currentItem->iname);
emit watchHandler()->model()->itemIsExpanded(idx);
if (currentItem) {
QModelIndex idx = watchHandler()->model()->indexForItem(currentItem);
if (idx.isValid() && idx.data(LocalsExpandedRole).toBool()) {
emit watchHandler()->model()->inameIsExpanded(currentItem->iname);
emit watchHandler()->model()->itemIsExpanded(idx);
}
}
if (m_variablesHandler->queueSize() == 1 && currentItem == nullptr) {