From d79e8dc342d3a5bd75f82ad42b848dc670372ee5 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 20 Aug 2009 15:11:12 +0200 Subject: [PATCH] debugger: small fixes in the QObject dumper and autotest --- share/qtcreator/gdbmacros/gdbmacros.cpp | 5 ++--- tests/auto/debugger/main.cpp | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 34e6f103a16..73e519b3b67 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -2294,7 +2294,7 @@ static void qDumpQObjectMethodList(QDumper &d) static const char *qConnectionType(uint type) { Qt::ConnectionType connType = static_cast(type); - const char *output; + const char *output = "unknown"; switch (connType) { case Qt::AutoConnection: output = "auto"; break; case Qt::DirectConnection: output = "direct"; break; @@ -2337,8 +2337,7 @@ static inline void qDumpQObjectConnectionPart(QDumper &d, d.put(number).put(namePostfix); d.endItem(); if (partner == owner) { - d.putItem("value", QLatin1String("")); - d.putItem("valueencoded", "2"); + d.putItem("value", ""); d.putItem("type", owner->metaObject()->className()); d.putItem("numchild", 0); d.putItem("addr", owner); diff --git a/tests/auto/debugger/main.cpp b/tests/auto/debugger/main.cpp index 6d52952e406..55d25220672 100644 --- a/tests/auto/debugger/main.cpp +++ b/tests/auto/debugger/main.cpp @@ -1788,7 +1788,7 @@ void tst_Debugger::dumpQObjectSignalHelper(QObject &o, int sigNum) const QString iStr = QString::number(i); expected.append("{name='").append(iStr).append(" receiver',"); if (conn->receiver == &o) - expected.append("value='").append(utfToBase64("")). + expected.append("value='").append(""). append("',valueencoded='2',type='").append(o.metaObject()->className()). append("',numchild='0',addr='").append(ptrToBa(&o)).append("'"); else if (conn->receiver == 0) @@ -1954,11 +1954,9 @@ void tst_Debugger::dumpQObjectSlotHelper(QObject &o, int slot) if (conn->receiver == &o && conn->method == slot) { ++numChild; const QMetaMethod &method = sender->metaObject()->method(signal); - if (numChild > 0) - expected.append(","); expected.append("{name='").append(senderNumStr).append(" sender',"); if (sender == &o) { - expected.append("value='").append(utfToBase64("")). + expected.append("value='").append(""). append("',type='").append(o.metaObject()->className()). append("',numchild='0',addr='").append(ptrToBa(&o)).append("'"); } else if (sender != 0) {