Commit aae1162b authored by hjk's avatar hjk Committed by con

debugger: fix child count in QAbstractItem dumpers

(cherry picked from commit b69fad92)
parent 150cbaaa
......@@ -1031,7 +1031,7 @@ static void qDumpQAbstractItem(QDumper &d)
//d.putItem("value", "(").put(rowCount).put(",").put(columnCount).put(")");
d.putItem("value", m->data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
d.putItem("numchild", "1");
d.putItem("numchild", rowCount * columnCount);
if (d.dumpChildren) {
d.beginChildren();
for (int row = 0; row < rowCount; ++row) {
......@@ -1042,7 +1042,7 @@ static void qDumpQAbstractItem(QDumper &d)
d.put("[").put(row).put(",").put(column).put("]");
d.endItem();
//d.putItem("numchild", (m->hasChildren(child) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m->rowCount(child) * m->columnCount(child));
d.beginItem("addr");
d.put("$").put(child.row()).put(",").put(child.column()).put(",")
.put(child.internalPointer()).put(",").put(child.model());
......@@ -1104,7 +1104,7 @@ static void qDumpQAbstractItemModel(QDumper &d)
d.putItem("value", m.data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
//d.putItem("numchild", (m.hasChildren(mi) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m.rowCount(mi) * m.columnCount(mi));
d.beginItem("addr");
d.put("$").put(mi.row()).put(",").put(mi.column()).put(",");
d.put(mi.internalPointer()).put(",").put(mi.model());
......
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