forked from qt-creator/qt-creator
DAP: Fix the same name variables expanding
Before when several variables had the same name it could be a cause that wrong variable will be expanded. Now the needed variables will be expanded. Change-Id: Icc945e573721d033db82cac85e2ed4dabb6ad25a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -720,7 +720,10 @@ void DapEngine::refreshLocals(const QJsonArray &variables)
|
||||
for (auto variable : variables) {
|
||||
WatchItem *item = new WatchItem;
|
||||
const QString name = variable.toObject().value("name").toString();
|
||||
if (m_isFirstLayer)
|
||||
item->iname = "local." + name;
|
||||
else
|
||||
item->iname = m_currentWatchItem->iname + "." + name;
|
||||
item->name = name;
|
||||
item->type = variable.toObject().value("type").toString();
|
||||
item->value = variable.toObject().value("value").toString();
|
||||
|
||||
Reference in New Issue
Block a user