Commit ae55b43c authored by hjk's avatar hjk

debugger: fix display of QObject properties

This is a backport of 5d645bfd
parent c5b027cd
...@@ -1326,6 +1326,13 @@ class Dumper: ...@@ -1326,6 +1326,13 @@ class Dumper:
nsStrippedType = self.stripNamespaceFromType( nsStrippedType = self.stripNamespaceFromType(
typedefStrippedType).replace("::", "__") typedefStrippedType).replace("::", "__")
# Is this derived from QObject?
try:
item.value['staticMetaObject']
hasMetaObject = True
except:
hasMetaObject = False
#warn(" STRIPPED: %s" % nsStrippedType) #warn(" STRIPPED: %s" % nsStrippedType)
#warn(" DUMPERS: %s" % self.dumpers) #warn(" DUMPERS: %s" % self.dumpers)
#warn(" DUMPERS: %s" % (nsStrippedType in self.dumpers)) #warn(" DUMPERS: %s" % (nsStrippedType in self.dumpers))
...@@ -1336,6 +1343,10 @@ class Dumper: ...@@ -1336,6 +1343,10 @@ class Dumper:
self.putValue(value) self.putValue(value)
self.putNumChild(0) self.putNumChild(0)
elif hasMetaObject and self.useFancy:
self.putType(item.value.type)
qdump__QObject(self, item)
elif nsStrippedType in self.dumpers: elif nsStrippedType in self.dumpers:
#warn("IS DUMPABLE: %s " % type) #warn("IS DUMPABLE: %s " % type)
self.putType(item.value.type) self.putType(item.value.type)
......
...@@ -578,9 +578,6 @@ def extractCString(table, offset): ...@@ -578,9 +578,6 @@ def extractCString(table, offset):
return result return result
def qdump__QWidget(d, item):
qdump__QObject(d, item)
def qdump__QObject(d, item): def qdump__QObject(d, item):
#warn("OBJECT: %s " % item.value) #warn("OBJECT: %s " % item.value)
staticMetaObject = item.value["staticMetaObject"] staticMetaObject = item.value["staticMetaObject"]
...@@ -617,15 +614,15 @@ def qdump__QObject(d, item): ...@@ -617,15 +614,15 @@ def qdump__QObject(d, item):
d.putNumChild(4) d.putNumChild(4)
if d.isExpanded(item): if d.isExpanded(item):
with Children(d): with Children(d):
d.putFields(item)
# Parent and children. # Parent and children.
d.putItem(Item(d_ptr["parent"], item.iname, "parent", "parent")) d.putItem(Item(d_ptr["parent"], item.iname, "parent", "parent"))
d.putItem(Item(d_ptr["children"], item.iname, "children", "children")) d.putItem(Item(d_ptr["children"], item.iname, "children", "children"))
# Properties. # Properties.
with SubItem(d): with SubItem(d):
#propertyCount = metaData[6] propertyCount = metaData[6]
# FIXME: Replace with plain memory accesses. #propertyCount = call(mo, "propertyCount()")
propertyCount = call(mo, "propertyCount()")
#warn("PROPERTY COUNT: %s" % propertyCount) #warn("PROPERTY COUNT: %s" % propertyCount)
propertyData = metaData[7] propertyData = metaData[7]
d.putName("properties") d.putName("properties")
......
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