Commit 979e2c29 authored by hjk's avatar hjk
Browse files

debugger: improve QRegion dumper

Don't use inferior calls anymore.
parent f01980e6
......@@ -1378,11 +1378,17 @@ def qdump__QRectF(d, item):
def qdump__QRegion(d, item):
d.putValue(" ")
d.putNumChild(1)
if d.isExpanded(item):
with Children(d):
d.putCallItem("rects", item, "rects()")
p = item.value["d"].dereference()["qt_rgn"]
if isNull(p):
d.putValue("<empty>")
d.putNumChild(0)
else:
n = str(p.dereference()["numRects"])
d.putItemCount(n)
d.putNumChild(n)
if d.isExpanded(item):
with Children(d):
d.putFields(Item(p.dereference(), item.iname))
# qt_rgn might be 0
# gdb.parse_and_eval("region")["d"].dereference()["qt_rgn"].dereference()
......
......@@ -810,6 +810,9 @@ void testQRegion()
region += QRect(100, 100, 200, 200);
region += QRect(300, 300, 400, 500);
region += QRect(500, 500, 600, 600);
region += QRect(500, 500, 600, 600);
region += QRect(500, 500, 600, 600);
region += QRect(500, 500, 600, 600);
}
......
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