forked from qt-creator/qt-creator
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:
@@ -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]'):
|
||||
|
Reference in New Issue
Block a user