Commit cc2433f7 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: fix display of signal-slot connection



Change-Id: I0923bdd0ba1166639d85f8343a5abce8f2912400
Reviewed-by: default avatarRobert Löhning <robert.loehning@nokia.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 18b675d3
......@@ -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.
......
......@@ -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.
......
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