From 0ce54ce1e4c2765fab2d1cf430e08990f76099ec Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 May 2016 12:23:41 +0200 Subject: [PATCH] Debugger: Guard QObject property extraction against failures Nowadays, the [property] section contains only "top level" properties, inherited ones are available through by expanding the base class. Task-number: QTCREATORBUG-15798 Change-Id: I40475500a2d20f27145a47fa7ed1e61d4a592c10 Reviewed-by: Robert Loehning Reviewed-by: Christian Stenger --- share/qtcreator/debugger/dumper.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index cad3bed4340..1a89935516f 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1460,9 +1460,13 @@ class DumperBase: self.put('keyencoded="latin1",') self.putItem(v) propertyCount += 1 - - self.putValue(str('<%s items>' % propertyCount if propertyCount else '<>0 items>')) - self.putNumChild(1) + self.putItemCount(propertyCount) + else: + # We need a handle to [x] for the user to expand the item + # before we know whether there are actual children. Counting + # them is too expensive. + self.putNumChild(1) + self.putSpecialValue("minimumitemcount", 0) with SubItem(self, "[methods]"): methodCount = self.staticQObjectMethodCount(smo)