Commit 45b269b2 authored by hjk's avatar hjk
Browse files

debugger: python dumpers for QTextCursor and QTextDocument

(cherry picked from commit 34e06215)

Reviewed-by: Friedemann Kleint
parent 1a2e16ae
......@@ -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
......
......@@ -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"])
......
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