Commit df0e1e56 authored by hjk's avatar hjk
Browse files

debugger: fix QList dumper for large movable objects

Doh!
parent 36a36799
......@@ -397,9 +397,9 @@ def qdump__QList(d, item):
# in the frontend.
# So as first approximation only do the 'isLarge' check:
isInternal = innerSize <= d_ptr.type.sizeof and d.isMovableType(innerType)
#warn("INTERNAL: %d" % int(isInternal))
p = gdb.Value(array).cast(innerType.pointer()) + begin
dummyType = gdb.lookup_type("void").pointer().pointer()
innerTypePointer = innerType.pointer()
p = gdb.Value(array).cast(dummyType) + begin
if innerTypeIsPointer:
inner = innerType.target()
else:
......@@ -408,10 +408,11 @@ def qdump__QList(d, item):
with Children(d, [size, 2000], inner):
for i in d.childRange():
if isInternal:
d.putItem(Item(p.dereference(), item.iname, i))
pp = p.cast(innerTypePointer).dereference();
d.putItem(Item(pp, item.iname, i))
else:
pp = p.cast(innerType.pointer().pointer()).dereference()
d.putItem(Item(pp.dereference(), item.iname, i))
pp = p.cast(innerTypePointer.pointer()).dereference()
d.putItem(Item(pp, item.iname, i))
p += 1
......
......@@ -1318,6 +1318,14 @@ QVariant testQVariant2()
QVariant testQVariant3()
{
QVariantList vl;
vl.append(QVariant(1));
vl.append(QVariant(2));
vl.append(QVariant("Some String"));
vl.append(QVariant(21));
vl.append(QVariant(22));
vl.append(QVariant("2Some String"));
QList<int> list;
list << 1 << 2 << 3;
QVariant variant = qVariantFromValue(list);
......
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