debugger: fix recently introduced off-by-one in gdbmi child parsing

Reviewed-by: Friedemann Kleint
This commit is contained in:
hjk
2010-10-12 11:30:34 +02:00
parent 3381c12cd5
commit 7a4ca5b879

View File

@@ -1708,10 +1708,10 @@ void parseWatchData(const QSet<QByteArray> &expandedINames,
setWatchDataChildCount(childtemplate, item.findChild("childnumchild"));
//qDebug() << "CHILD TEMPLATE:" << childtemplate.toString();
int i = 0;
foreach (const GdbMi &child, children.children()) {
for (int i = 0, n = children.children().size(); i != n; ++i) {
const GdbMi &child = children.children().at(i);
WatchData data1 = childtemplate;
data1.sortId = i++;
data1.sortId = i;
GdbMi name = child.findChild("name");
if (name.isValid())
data1.name = _(name.data());