forked from qt-creator/qt-creator
debugger: fix child count in QAbstractItem dumpers
(cherry picked from commit b69fad927a
)
This commit is contained in:
@@ -1031,7 +1031,7 @@ static void qDumpQAbstractItem(QDumper &d)
|
|||||||
//d.putItem("value", "(").put(rowCount).put(",").put(columnCount).put(")");
|
//d.putItem("value", "(").put(rowCount).put(",").put(columnCount).put(")");
|
||||||
d.putItem("value", m->data(mi, Qt::DisplayRole).toString());
|
d.putItem("value", m->data(mi, Qt::DisplayRole).toString());
|
||||||
d.putItem("valueencoded", "2");
|
d.putItem("valueencoded", "2");
|
||||||
d.putItem("numchild", "1");
|
d.putItem("numchild", rowCount * columnCount);
|
||||||
if (d.dumpChildren) {
|
if (d.dumpChildren) {
|
||||||
d.beginChildren();
|
d.beginChildren();
|
||||||
for (int row = 0; row < rowCount; ++row) {
|
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.put("[").put(row).put(",").put(column).put("]");
|
||||||
d.endItem();
|
d.endItem();
|
||||||
//d.putItem("numchild", (m->hasChildren(child) ? "1" : "0"));
|
//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.beginItem("addr");
|
||||||
d.put("$").put(child.row()).put(",").put(child.column()).put(",")
|
d.put("$").put(child.row()).put(",").put(child.column()).put(",")
|
||||||
.put(child.internalPointer()).put(",").put(child.model());
|
.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("value", m.data(mi, Qt::DisplayRole).toString());
|
||||||
d.putItem("valueencoded", "2");
|
d.putItem("valueencoded", "2");
|
||||||
//d.putItem("numchild", (m.hasChildren(mi) ? "1" : "0"));
|
//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.beginItem("addr");
|
||||||
d.put("$").put(mi.row()).put(",").put(mi.column()).put(",");
|
d.put("$").put(mi.row()).put(",").put(mi.column()).put(",");
|
||||||
d.put(mi.internalPointer()).put(",").put(mi.model());
|
d.put(mi.internalPointer()).put(",").put(mi.model());
|
||||||
|
Reference in New Issue
Block a user