forked from qt-creator/qt-creator
debugger: fix QObject property dumper for namespaced qt
This commit is contained in:
@@ -669,11 +669,12 @@ def qdump__QObject(d, item):
|
|||||||
d.putNumChild(propertyCount)
|
d.putNumChild(propertyCount)
|
||||||
|
|
||||||
if d.isExpandedIName(item.iname + ".properties"):
|
if d.isExpandedIName(item.iname + ".properties"):
|
||||||
with Children(d, [propertyCount, 500]):
|
# FIXME: Make this global. Don't leak.
|
||||||
# FIXME: Make this global. Don't leak.
|
variant = "'%sQVariant'" % d.ns
|
||||||
gdb.execute("set $d = (QVariant*)malloc(sizeof(QVariant))")
|
gdb.execute("set $d = (%s*)malloc(sizeof(%s))" % (variant, variant))
|
||||||
gdb.execute("set $d.d.is_shared = 0")
|
gdb.execute("set $d.d.is_shared = 0")
|
||||||
|
|
||||||
|
with Children(d, [propertyCount, 500]):
|
||||||
# Dynamic properties.
|
# Dynamic properties.
|
||||||
if dynamicPropertyCount != 0:
|
if dynamicPropertyCount != 0:
|
||||||
dummyType = lookupType("void").pointer().pointer()
|
dummyType = lookupType("void").pointer().pointer()
|
||||||
@@ -692,8 +693,8 @@ def qdump__QObject(d, item):
|
|||||||
qq = q.cast(valuesType.pointer().pointer())
|
qq = q.cast(valuesType.pointer().pointer())
|
||||||
qq = qq.dereference();
|
qq = qq.dereference();
|
||||||
d.putField("addr", cleanAddress(qq))
|
d.putField("addr", cleanAddress(qq))
|
||||||
d.putField("exp", "*('%sQVariant'*)%s"
|
d.putField("exp", "*(%s*)%s"
|
||||||
% (d.ns, cleanAddress(qq)))
|
% (variant, cleanAddress(qq)))
|
||||||
name = "%s.properties.%d" % (item.iname, i)
|
name = "%s.properties.%d" % (item.iname, i)
|
||||||
t = qdump__QVariant(d, Item(qq, name))
|
t = qdump__QVariant(d, Item(qq, name))
|
||||||
# Override the "QVariant (foo)" output
|
# Override the "QVariant (foo)" output
|
||||||
|
Reference in New Issue
Block a user