Debugger: Some parser code consolidation

Change-Id: Icd3afb632cb935fdd95f13db91c9c11a3dea732e
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2015-01-29 13:53:15 +01:00
parent 0d0a6d119a
commit bea159a701
5 changed files with 21 additions and 32 deletions

View File

@@ -1019,21 +1019,7 @@ void LldbEngine::refreshLocals(const GdbMi &vars)
toDelete.insert(item->d.iname);
foreach (const GdbMi &child, vars.children()) {
QByteArray iname = child["iname"].data();
QString name;
GdbMi wname = child["wname"];
if (wname.isValid()) // Happens (only) for watched expressions.
name = QString::fromUtf8(QByteArray::fromHex(wname.data()));
else
name = QString::fromLatin1(child["name"].data());
WatchItem *item = new WatchItem(iname, name);
item->parseWatchData(child);
if (wname.isValid())
item->d.exp = name.toUtf8();
WatchItem *item = new WatchItem(child);
handler->insertItem(item);
toDelete.remove(item->d.iname);
}