From 0576fa01fa386f3dbf9901483d1588764142209c Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 31 May 2012 12:11:02 +0200 Subject: [PATCH] debugger: do not offer expansion for inaccessible items Change-Id: Ib8607377e36dbf51aa38b32a18491ec3437a2387 Reviewed-by: hjk --- share/qtcreator/dumper/dumper.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/dumper/dumper.py b/share/qtcreator/dumper/dumper.py index 206e0113110..3c8f3ab575d 100644 --- a/share/qtcreator/dumper/dumper.py +++ b/share/qtcreator/dumper/dumper.py @@ -365,8 +365,11 @@ class SubItem: def __exit__(self, exType, exValue, exTraceBack): #warn(" CURRENT VALUE: %s %s %s" % (self.d.currentValue, # self.d.currentValueEncoding, self.d.currentValuePriority)) - if self.d.passExceptions and not exType is None: - showException("SUBITEM", exType, exValue, exTraceBack) + if not exType is None: + if self.d.passExceptions: + showException("SUBITEM", exType, exValue, exTraceBack) + self.d.putNumChild(0) + self.d.putValue("") try: #warn("TYPE VALUE: %s" % self.d.currentValue) typeName = stripClassTag(self.d.currentType) @@ -451,8 +454,11 @@ class Children: self.d.put("children=[") def __exit__(self, exType, exValue, exTraceBack): - if self.d.passExceptions and not exType is None: - showException("CHILDREN", exType, exValue, exTraceBack) + if not exType is None: + if self.d.passExceptions: + showException("CHILDREN", exType, exValue, exTraceBack) + self.d.putNumChild(0) + self.d.putValue("") if not self.d.currentMaxNumChild is None: if self.d.currentMaxNumChild < self.d.currentNumChild: self.d.put('{name="",value="",type="",numchild="0"},')