Commit 18b91ae4 authored by hjk's avatar hjk

Debugger: Move putPlainChildren() to Dumper base

It's reusable...

Change-Id: I1a0f40b9b3bbecf99024d3a2fd5148baf604109b
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 50459e57
......@@ -550,6 +550,13 @@ class DumperBase:
self.putSubItem("first", key)
self.putSubItem("second", value)
def putPlainChildren(self, value, dumpBase = True):
self.putEmptyValue(-99)
self.putNumChild(1)
if self.isExpanded():
with Children(self):
self.putFields(value, dumpBase)
def isMapCompact(self, keyType, valueType):
format = self.currentItemFormat()
if format == 2:
......
......@@ -1293,14 +1293,6 @@ class Dumper(DumperBase):
if staticMetaObject:
self.putQObjectGuts(value, staticMetaObject)
def putPlainChildren(self, value):
self.putEmptyValue(-99)
self.putNumChild(1)
if self.currentIName in self.expandedINames:
with Children(self):
self.putFields(value)
def toBlob(self, value):
size = toInteger(value.type.sizeof)
if value.address:
......
......@@ -363,14 +363,9 @@ if False:
def qdump__KDSoapValue1(d, value):
inner = value["d"]["d"].dereference()
d.putStringValue(inner["m_name"])
if d.isExpanded():
with Children(d):
d.putFields(inner)
d.putPlainChildren(inner)
def qdump__KDSoapValue(d, value):
p = (value.cast(lookupType("char*")) + 4).dereference().cast(lookupType("QString"))
d.putStringValue(p)
if d.isExpanded():
with Children(d):
data = value["d"]["d"].dereference()
d.putFields(data)
d.putPlainChildren(value["d"]["d"].dereference())
......@@ -156,7 +156,6 @@ def qdump__QModelIndex(d, value):
rowCount = int(d.parseAndEvaluate("%s.rowCount(%s)" % (mm_, mi_)))
columnCount = int(d.parseAndEvaluate("%s.columnCount(%s)" % (mm_, mi_)))
except:
d.putEmptyValue()
d.putPlainChildren(value)
return
......@@ -1211,11 +1210,7 @@ def _qdump__QObject(d, value):
with SubItem(d, "data"):
d.putEmptyValue()
d.putNoType()
d.putNumChild(1)
if d.isExpanded():
with Children(d):
d.putFields(d_ptr, False)
d.putPlainChildren(d_ptr, False)
d.putFields(value)
# Parent and children.
......@@ -2273,11 +2268,7 @@ def qdump__QV4__Value(d, value):
pass
# Fall back for cases that we do not handle specifically.
d.putEmptyValue()
d.putNumChild(1)
if d.isExpanded():
with Children(d):
d.putFields(value)
d.putPlainChildren(value)
#######################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment