diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 56b31f272058773907d1dcbb62a06c069a2fbf25..4d7ef4553a8571a4d9115f3a45554e1d9da38286 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -1480,12 +1480,12 @@ class Dumper: #warn("IS DUMPABLE: %s " % type) #self.putAddress(value.address) self.putType(realtype) - if isQObjectDerived: + if nsStrippedType in qqDumpers: + qqDumpers[nsStrippedType](self, item) + elif isQObjectDerived: # value has references stripped off item.value. item1 = Item(value, item.iname) qdump__QObject(self, item1) - else: - qqDumpers[nsStrippedType](self, item) #warn(" RESULT: %s " % self.output) return diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index ac3eeeffd2f898898fb63c912a0a19a36a224d13..b3b284e4bdd2004dfa09ae4ebea7378920222f8c 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -1651,6 +1651,29 @@ def qdump__QTextCodec(d, item): d.putCallItem("mibEnum", item, "mibEnum()") +def qdump__QTextCursor(d, item): + p = item.value["d"]["d"].dereference() + d.putValue(p["position"]) + d.putNumChild(1) + if d.isExpanded(item): + with Children(d): + d.putIntItem("position", p["position"]) + d.putIntItem("anchor", p["anchor"]) + d.putCallItem("selected", item, "selectedText()") + + +def qdump__QTextDocument(d, item): + d.putValue(" ") + d.putNumChild(1) + if d.isExpanded(item): + with Children(d): + d.putCallItem("blockCount", item, "blockCount()") + d.putCallItem("characterCount", item, "characterCount()") + d.putCallItem("lineCount", item, "lineCount()") + d.putCallItem("revision", item, "revision()") + d.putCallItem("toPlainText", item, "toPlainText()") + + def qdump__QUrl(d, item): data = item.value["d"].dereference() d.putStringValue(data["encodedOriginal"])