aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/debugger
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-04-09 15:26:47 +0200
committerhjk <hjk@qt.io>2019-06-18 09:55:07 +0000
commit93d2e3352c3969a77465ed08b337860474819b13 (patch)
tree0636f064e49efdaf60f46b9d393a03e95530677a /share/qtcreator/debugger
parentb02f4ae6154810a9894615eca3052957e6e3ec56 (diff)
Debugger: Improve QObject dumper
Don't use two lookups for parent types and act on known null pointers. While the machinery is robust enough to handle the result it's a needless deviation in regular code path. Change-Id: I6e50629cf554870a3ffb9f488f654e6ae557e5b3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'share/qtcreator/debugger')
-rw-r--r--share/qtcreator/debugger/dumper.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 2c66f39a5d..586df832c0 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -1895,10 +1895,14 @@ class DumperBase:
if qobjectPtr:
qobjectType = self.createType('QObject')
- qobjectPtrType = self.createType('QObject') # FIXME.
with SubItem(self, '[parent]'):
self.putField('sortgroup', 9)
- self.putItem(self.createValue(parentPtr, qobjectPtrType))
+ if parentPtr:
+ self.putItem(self.createValue(parentPtr, qobjectType))
+ else:
+ self.putValue('0x0')
+ self.putType('QObject *')
+ self.putNumChild(0)
with SubItem(self, '[children]'):
self.putField('sortgroup', 8)
base = self.extractPointer(dd + 3 * ptrSize) # It's a QList<QObject *>