Commit a5e893a4 authored by hjk's avatar hjk Committed by hjk

debugger: improve QHostAddress dumper

Change-Id: Ie1e52619a3fa8d47e60f6508aa9a6d5fc9a0d21b
Reviewed-on: http://codereview.qt.nokia.com/2693Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 478ba054
......@@ -426,7 +426,17 @@ def qdump__QHashNode(d, item):
def qdump__QHostAddress(d, item):
data = item.value["d"]["d"].dereference()
d.putStringValue(data["ipString"])
if int(data["ipString"]["d"]["size"]):
d.putStringValue(data["ipString"])
else:
a = data["a"]
m, a = divmod(a, 256 * 256 * 256)
s = str(m)
m, a = divmod(a, 256 * 256)
s = s + "." + str(m)
m, a = divmod(a, 256)
s = s + "." + str(m)
d.putValue(s)
d.putNumChild(1)
if d.isExpanded(item):
with Children(d):
......
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