diff options
author | hjk <qtc-committer@nokia.com> | 2011-11-04 17:21:13 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2011-11-09 08:49:08 +0100 |
commit | 371ae894f0fc4a26313eafb5de168b3e31b8a8de (patch) | |
tree | 732c1526932b3e9768e5c7d3b68aa9691d8cc261 | |
parent | 04dfc449702317adc05b101c452f51e86ddc6677 (diff) | |
download | qt-creator-371ae894f0fc4a26313eafb5de168b3e31b8a8de.tar.gz |
debugger: fix display of signal-slot connection
Change-Id: I0923bdd0ba1166639d85f8343a5abce8f2912400
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
-rw-r--r-- | share/qtcreator/dumper/qttypes.py | 11 | ||||
-rw-r--r-- | tests/manual/debugger/simple/simple_test_app.cpp | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py index e995cae116..2f905b6895 100644 --- a/share/qtcreator/dumper/qttypes.py +++ b/share/qtcreator/dumper/qttypes.py @@ -882,22 +882,27 @@ def qdump__QObject(d, value): d.putItemCount(connectionListCount, 0) d.putNumChild(connectionListCount) if d.isExpanded(): + pp = 0 with Children(d): vectorType = connections.type.target().fields()[0].type innerType = templateArgument(vectorType, 0) # Should check: innerType == ns::QObjectPrivate::ConnectionList p = gdb.Value(connections["p"]["array"]).cast(innerType.pointer()) - pp = 0 for i in xrange(connectionListCount): first = p.dereference()["first"] while not isNull(first): - d.putSubItem(i, first.dereference()) - first = first["next"] + with SubItem(d, pp): + connection = first.dereference() + d.putItem(connection) + d.putValue(connection["callFunction"]) + first = first["nextConnectionList"] # We need to enforce some upper limit. pp += 1 if pp > 1000: break p += 1 + if pp < 1000: + d.putItemCount(pp) # Signals. diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 1e6531ec99..efe18f6f20 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -917,8 +917,8 @@ namespace qobject { parent.setObjectName("A Parent"); QObject child(&parent); child.setObjectName("A Child"); - QObject::connect(&child, SIGNAL(destroyed()), qApp, SLOT(quit())); - QObject::disconnect(&child, SIGNAL(destroyed()), qApp, SLOT(quit())); + QObject::connect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater())); + QObject::disconnect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater())); child.setObjectName("A renamed Child"); BREAK_HERE; // Expand all. |