diff options
author | hjk <qtc-committer@nokia.com> | 2010-08-13 09:50:14 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-08-13 09:58:13 +0200 |
commit | 24bfcff43704efe724d0434f3ab6cafa84f6738d (patch) | |
tree | 72e5d28e90e6c16a7291237de61162951f0f04fe | |
parent | e2000c69384a998b455e8f4948f189ddfe5a05bd (diff) | |
download | qt-creator-24bfcff43704efe724d0434f3ab6cafa84f6738d.tar.gz |
debugger: fix display of QObject properties
This is a backport of 5d645bfdfe87b22315997847191ac7d45b243e99
(cherry picked from commit ae55b43c3782a06d625805e2135f2a0c3b7754b2)
-rw-r--r-- | share/qtcreator/gdbmacros/dumper.py | 11 | ||||
-rw-r--r-- | share/qtcreator/gdbmacros/gdbmacros.py | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 7739536c76..d665f51716 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -1327,6 +1327,13 @@ class Dumper: nsStrippedType = self.stripNamespaceFromType( typedefStrippedType).replace("::", "__") + # Is this derived from QObject? + try: + item.value['staticMetaObject'] + hasMetaObject = True + except: + hasMetaObject = False + #warn(" STRIPPED: %s" % nsStrippedType) #warn(" DUMPERS: %s" % self.dumpers) #warn(" DUMPERS: %s" % (nsStrippedType in self.dumpers)) @@ -1337,6 +1344,10 @@ class Dumper: self.putValue(value) self.putNumChild(0) + elif hasMetaObject and self.useFancy: + self.putType(item.value.type) + qdump__QObject(self, item) + elif nsStrippedType in self.dumpers: #warn("IS DUMPABLE: %s " % type) self.putType(item.value.type) diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index ab6bceaba6..49906fe75c 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -578,9 +578,6 @@ def extractCString(table, offset): return result -def qdump__QWidget(d, item): - qdump__QObject(d, item) - def qdump__QObject(d, item): #warn("OBJECT: %s " % item.value) staticMetaObject = item.value["staticMetaObject"] @@ -617,15 +614,15 @@ def qdump__QObject(d, item): d.putNumChild(4) if d.isExpanded(item): with Children(d): + d.putFields(item) # Parent and children. d.putItem(Item(d_ptr["parent"], item.iname, "parent", "parent")) d.putItem(Item(d_ptr["children"], item.iname, "children", "children")) # Properties. with SubItem(d): - #propertyCount = metaData[6] - # FIXME: Replace with plain memory accesses. - propertyCount = call(mo, "propertyCount()") + propertyCount = metaData[6] + #propertyCount = call(mo, "propertyCount()") #warn("PROPERTY COUNT: %s" % propertyCount) propertyData = metaData[7] d.putName("properties") |