debugger: cosmetics of the dumper output

This commit is contained in:
hjk
2009-08-27 16:52:14 +02:00
parent 56b3561828
commit 9b34946f85
2 changed files with 6 additions and 7 deletions

View File

@@ -2269,7 +2269,7 @@ static void qDumpQObjectMethodList(QDumper &d)
d.putItem("type", NS"QObjectMethodList"); d.putItem("type", NS"QObjectMethodList");
d.putItem("numchild", mo->methodCount()); d.putItem("numchild", mo->methodCount());
if (d.dumpChildren) { if (d.dumpChildren) {
d.putItem("childtype", "QMetaMethod::Method"); d.putItem("childtype", NS"QMetaMethod::Method");
d.putItem("childnumchild", "0"); d.putItem("childnumchild", "0");
d.beginChildren(); d.beginChildren();
for (int i = 0; i != mo->methodCount(); ++i) { for (int i = 0; i != mo->methodCount(); ++i) {
@@ -2400,7 +2400,7 @@ static void qDumpQObjectSignalList(QDumper &d)
const int methodCount = mo->methodCount(); const int methodCount = mo->methodCount();
for (int i = methodCount; --i >= 0; ) for (int i = methodCount; --i >= 0; )
count += (mo->method(i).methodType() == QMetaMethod::Signal); count += (mo->method(i).methodType() == QMetaMethod::Signal);
d.putItem("type", "QObjectSignalList"); d.putItem("type", NS"QObjectSignalList");
d.putItemCount("value", count); d.putItemCount("value", count);
d.putItem("addr", d.data); d.putItem("addr", d.data);
d.putItem("numchild", count); d.putItem("numchild", count);

View File

@@ -1741,9 +1741,8 @@ void tst_Debugger::dumpQObjectChildList()
void tst_Debugger::dumpQObjectMethodList() void tst_Debugger::dumpQObjectMethodList()
{ {
QStringListModel m; QStringListModel m;
qDebug() << "FIXME: that should be NS::QMetaMethod::Method";
testDumper("addr='<synthetic>',type='$T',numchild='20'," testDumper("addr='<synthetic>',type='$T',numchild='20',"
"childtype='QMetaMethod::Method',childnumchild='0',children=[" "childtype='"NS"QMetaMethod::Method',childnumchild='0',children=["
"{name='0 0 destroyed(QObject*)',value='<Signal> (1)'}," "{name='0 0 destroyed(QObject*)',value='<Signal> (1)'},"
"{name='1 1 destroyed()',value='<Signal> (1)'}," "{name='1 1 destroyed()',value='<Signal> (1)'},"
"{name='2 2 deleteLater()',value='<Slot> (2)'}," "{name='2 2 deleteLater()',value='<Slot> (2)'},"
@@ -1905,8 +1904,8 @@ void tst_Debugger::dumpQObjectSignalList()
QObject o; QObject o;
o.setObjectName("Test"); o.setObjectName("Test");
qDebug() << "FIXME: that should be NS::QObjectSignalList"; testDumper("type='"NS"QObjectSignalList',value='<2 items>',"
testDumper("type='QObjectSignalList',value='<2 items>',addr='$A',numchild='2',children=[" "addr='$A',numchild='2',children=["
"{name='0',value='destroyed(QObject*)',numchild='0'," "{name='0',value='destroyed(QObject*)',numchild='0',"
"addr='$A',type='"NS"QObjectSignal'}," "addr='$A',type='"NS"QObjectSignal'},"
"{name='1',value='destroyed()',numchild='0'," "{name='1',value='destroyed()',numchild='0',"
@@ -1915,7 +1914,7 @@ void tst_Debugger::dumpQObjectSignalList()
// Case 2: QAbstractItemModel with no connections. // Case 2: QAbstractItemModel with no connections.
QStringListModel m(QStringList() << "Test1" << "Test2"); QStringListModel m(QStringList() << "Test1" << "Test2");
QByteArray expected = "type='QObjectSignalList',value='<16 items>'," QByteArray expected = "type='"NS"QObjectSignalList',value='<16 items>',"
"addr='$A',numchild='16',children=[" "addr='$A',numchild='16',children=["
"{name='0',value='destroyed(QObject*)',numchild='0'," "{name='0',value='destroyed(QObject*)',numchild='0',"
"addr='$A',type='"NS"QObjectSignal'}," "addr='$A',type='"NS"QObjectSignal'},"