diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 40230fee147..d24d649f556 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1863,10 +1863,6 @@ class DumperBase: self.putTypedPointer('[extraData]', extraData, ns + 'QObjectPrivate::ExtraData') - if connectionListsPtr: - self.putTypedPointer('[connectionLists]', connectionListsPtr, - ns + 'QObjectConnectionListVector') - with SubItem(self, '[metaObject]'): self.putAddress(metaObjectPtr) self.putNumChild(1) @@ -1874,6 +1870,40 @@ class DumperBase: with Children(self): self.putQObjectGutsHelper(0, 0, -1, metaObjectPtr, 'QMetaObject') + with SubItem(self, '[connections]'): + if connectionListsPtr: + typeName = ns + 'QVector<' + ns + 'QObjectPrivate::ConnectionList>' + self.putItem(self.createValue(connectionListsPtr, typeName)) + else: + self.putItemCount(0) + + with SubItem(self, '[signals]'): + self.putItemCount(signalCount) + if self.isExpanded(): + with Children(self): + j = -1 + for i in range(signalCount): + t = self.split('IIIII', dataPtr + 56 + 20 * i) + flags = t[4] + if flags != 0x06: + continue + j += 1 + with SubItem(self, j): + name = self.metaString(metaObjectPtr, t[0], revision) + self.putType(' ') + self.putValue(name) + self.putNumChild(1) + with Children(self): + putt('[nameindex]', t[0]) + #putt('[type]', 'signal') + putt('[argc]', t[1]) + putt('[parameter]', t[2]) + putt('[tag]', t[3]) + putt('[flags]', t[4]) + putt('[localindex]', str(i)) + putt('[globalindex]', str(globalOffset + i)) + #self.putQObjectConnections(dd) + if isQMetaObject or isQObject: with SubItem(self, '[properties]'): @@ -2012,20 +2042,6 @@ class DumperBase: self.putValue(globalOffset + localIndex) - #with SubItem(self, '[signals]'): - # self.putItemCount(signalCount) - # signalNames = metaData(52, -14, 5) - # warn('NAMES: %s' % signalNames) - # if self.isExpanded(): - # with Children(self): - # putt('A', 'b') - # for i in range(signalCount): - # k = signalNames[i] - # with SubItem(self, k): - # self.putEmptyValue() - # if dd: - # self.putQObjectConnections(dd) - def putQObjectConnections(self, dd): with SubItem(self, '[connections]'): ptrSize = self.ptrSize() diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 29cbfb5e2f1..0877634a3c5 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1078,6 +1078,26 @@ def qdump__QMetaObject(d, value): d.putMembersItem(value) +def qdump__QObjectPrivate__ConnectionList(d, value): + d.putNumChild(1) + if d.isExpanded(): + i = 0 + with Children(d): + first, last = value.split('pp') + currentConnection = first + connectionType = d.createType('QObjectPrivate::Connection') + while currentConnection and currentConnection != last: + sender, receiver, slotObj, nextConnectionList, nextp, prev = \ + d.split('pppppp', currentConnection) + d.putSubItem(i, d.createValue(currentConnection, connectionType)) + currentConnection = nextp + i += 1 + d.putFields(value) + d.putItemCount(i) + else: + d.putSpecialValue('minimumitemcount', 0) + + def qdump__QPixmap(d, value): if d.qtVersion() < 0x050000: (vtbl, painters, dataPtr) = value.split('ppp'); diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 00d2bc05f4b..eb3fa0dd5f4 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2723,7 +2723,8 @@ void tst_Dumpers::dumper_data() + Check("ob", "\"An Object\"", "@QWidget") + Check("ob1", "\"Another Object\"", "@QObject") - + Check("ob2", "\"A Subobject\"", "@QObject"); + + Check("ob2", "\"A Subobject\"", "@QObject") + + Check("ob.[extra].[connections].0.0.receiver", "\"Another Object\"", "@QObject"); QString senderData =