forked from qt-creator/qt-creator
Debugger: optimize QStandardItem dumper for cdb
Change-Id: I97f448da86f03edf82f0f1543e8c784d1f3a5f8b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -235,8 +235,23 @@ def qdump__QStandardItem(d, value):
|
|||||||
|
|
||||||
vtable, dptr = value.split('pp')
|
vtable, dptr = value.split('pp')
|
||||||
if d.qtVersionAtLeast(0x060000):
|
if d.qtVersionAtLeast(0x060000):
|
||||||
model, parent, values, children, rows, cols, item = \
|
if d.isCdb:
|
||||||
d.split('pp{@QList<@QStandardItemData>}{@QList<@QStandardItem *>}IIp', dptr)
|
if d.isDebugBuild is None:
|
||||||
|
try:
|
||||||
|
value["d_ptr"]
|
||||||
|
d.isDebugBuild = True
|
||||||
|
except Exception:
|
||||||
|
d.isDebugBuild = False
|
||||||
|
if d.isDebugBuild:
|
||||||
|
model = value["d_ptr"]["d"]["model"]
|
||||||
|
values = value["d_ptr"]["d"]["values"]
|
||||||
|
children = value["d_ptr"]["d"]["children"]
|
||||||
|
else:
|
||||||
|
model, parent, values, children, rows, cols, item = \
|
||||||
|
d.split('pp{@QList<@QStandardItemData>}{@QList<@QStandardItem *>}IIp', dptr)
|
||||||
|
else:
|
||||||
|
model, parent, values, children, rows, cols, item = \
|
||||||
|
d.split('pp{@QList<@QStandardItemData>}{@QList<@QStandardItem *>}IIp', dptr)
|
||||||
else:
|
else:
|
||||||
# There used to be a virtual destructor that got removed in
|
# There used to be a virtual destructor that got removed in
|
||||||
# 88b6abcebf29b455438 on Apr 18 17:01:22 2017
|
# 88b6abcebf29b455438 on Apr 18 17:01:22 2017
|
||||||
@@ -249,7 +264,9 @@ def qdump__QStandardItem(d, value):
|
|||||||
d.putExpandable()
|
d.putExpandable()
|
||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
with Children(d):
|
with Children(d):
|
||||||
d.putSubItem('[model]', d.createValue(model, '@QStandardItemModel'))
|
if isinstance(model, int): # Used as address.
|
||||||
|
model = d.createValue(model, '@QStandardItemModel')
|
||||||
|
d.putSubItem('[model]', model)
|
||||||
d.putSubItem('[values]', values)
|
d.putSubItem('[values]', values)
|
||||||
d.putSubItem('[children]', children)
|
d.putSubItem('[children]', children)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user