Commit 34e06215 authored by hjk's avatar hjk
Browse files

debugger: python dumpers for QTextCursor and QTextDocument

parent 1c56c56c
...@@ -1480,12 +1480,12 @@ class Dumper: ...@@ -1480,12 +1480,12 @@ class Dumper:
#warn("IS DUMPABLE: %s " % type) #warn("IS DUMPABLE: %s " % type)
#self.putAddress(value.address) #self.putAddress(value.address)
self.putType(realtype) self.putType(realtype)
if isQObjectDerived: if nsStrippedType in qqDumpers:
qqDumpers[nsStrippedType](self, item)
elif isQObjectDerived:
# value has references stripped off item.value. # value has references stripped off item.value.
item1 = Item(value, item.iname) item1 = Item(value, item.iname)
qdump__QObject(self, item1) qdump__QObject(self, item1)
else:
qqDumpers[nsStrippedType](self, item)
#warn(" RESULT: %s " % self.output) #warn(" RESULT: %s " % self.output)
return return
......
...@@ -1651,6 +1651,29 @@ def qdump__QTextCodec(d, item): ...@@ -1651,6 +1651,29 @@ def qdump__QTextCodec(d, item):
d.putCallItem("mibEnum", item, "mibEnum()") 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): def qdump__QUrl(d, item):
data = item.value["d"].dereference() data = item.value["d"].dereference()
d.putStringValue(data["encodedOriginal"]) 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