Debugger: re-add old qobject children dumper for qtversion < 6

Change-Id: Icbafb7c22d18247f89a8aa6a5029c9914d251c2e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2020-12-08 11:58:00 +01:00
parent a41b4eea75
commit 6187998090

View File

@@ -1897,9 +1897,31 @@ class DumperBase():
with SubItem(self, '[children]'):
if not self.isCli:
self.putSortGroup(8)
dvtablePtr, qptr, parentPtr, children \
= self.split('ppp{QList<QObject*>}', dd)
self.putItem(children)
if self.qtVersion() >= 0x60000:
dvtablePtr, qptr, parentPtr, children \
= self.split('ppp{QList<QObject*>}', dd)
self.putItem(children)
else:
base = self.extractPointer(dd + 3 * ptrSize) # It's a QList<QObject *>
begin = self.extractInt(base + 8)
end = self.extractInt(base + 12)
array = base + 16
if self.qtVersion() < 0x50000:
array += ptrSize
self.check(begin >= 0 and end >= 0 and end <= 1000 * 1000 * 1000)
size = end - begin
self.check(size >= 0)
self.putItemCount(size)
if size > 0:
self.putExpandable()
if self.isExpanded():
addrBase = array + begin * ptrSize
with Children(self, size):
for i in self.childRange():
with SubItem(self, i):
childPtr = self.extractPointer(addrBase + i * ptrSize)
self.putItem(self.createValue(childPtr, qobjectType))
if isQMetaObject:
with SubItem(self, '[strings]'):