aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-04-10 15:02:29 +0200
committerhjk <hjk121@nokiamail.com>2014-04-11 16:50:17 +0200
commite6292d3681bd93f9965322ad39a47bb0c24f060b (patch)
tree64e0689fe3400d394c1888b742bd4805d1641620 /share
parent41582b19110450cf48388dfe0a0a7c8aa989b73e (diff)
Debugger: Better connection count display
Not a full fix yet. Disconnect does not reduce the count since the Connection object remains in the structure, only the receiver gets set to 0. The connections are now listed as subitem of [signals] Change-Id: I3dd795b3731b30e2af6f4d0e5da71dbde8996649 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/dumper.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index bd5e3c27f8..0f3cb1b619 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -1156,8 +1156,11 @@ class DumperBase:
k = signalNames[i]
with SubItem(self, k):
self.putEmptyValue()
+ self.putQObjectConnections(qobject)
+ def putQObjectConnections(self, qobject):
with SubItem(self, "[connections]"):
+ ptrSize = self.ptrSize()
self.putNoType()
ns = self.qtNamespace()
privateTypeName = ns + "QObjectPrivate"
@@ -1165,31 +1168,32 @@ class DumperBase:
dd = qobject["d_ptr"]["d"]
d_ptr = dd.cast(privateType.pointer()).dereference()
connections = d_ptr["connectionLists"]
- connectionListCount = 0
- if not self.isNull(connections):
- connectionListCount = connections["d"]["size"]
- self.putItemCount(connectionListCount, 0)
- self.putNumChild(connectionListCount)
+ if self.isNull(connections):
+ self.putItemCount(0)
+ self.putNumChild(0)
+ else:
+ connections = connections.dereference()
+ connections = connections.cast(self.directBaseClass(connections.type))
+ self.putValue('<>0 items>')
+ self.putNumChild(1)
if self.isExpanded():
pp = 0
with Children(self):
- vectorType = self.fieldAt(connections.type.target(), 0).type
- innerType = self.templateArgument(vectorType, 0)
+ innerType = self.templateArgument(connections.type, 0)
# Should check: innerType == ns::QObjectPrivate::ConnectionList
- base = self.extractPointer(connections.dereference())
+ base = self.extractPointer(connections)
data, size, alloc = self.vectorDataHelper(base)
connectionType = self.lookupType(ns + "QObjectPrivate::Connection")
for i in xrange(size):
first = self.extractPointer(data + i * 2 * ptrSize)
- while not self.isNull(first):
- self.putSubItem("%s" % pp, self.createPointerValue(first, connectionType))
+ while first:
+ self.putSubItem("%s" % pp,
+ self.createPointerValue(first, connectionType))
first = self.extractPointer(first + 3 * ptrSize)
# We need to enforce some upper limit.
pp += 1
if pp > 1000:
break
- if pp < 1000:
- self.putItemCount(pp)
def isKnownMovableType(self, type):
if type in (