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,6 +235,21 @@ def qdump__QStandardItem(d, value):
|
||||
|
||||
vtable, dptr = value.split('pp')
|
||||
if d.qtVersionAtLeast(0x060000):
|
||||
if d.isCdb:
|
||||
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:
|
||||
@@ -249,7 +264,9 @@ def qdump__QStandardItem(d, value):
|
||||
d.putExpandable()
|
||||
if d.isExpanded():
|
||||
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('[children]', children)
|
||||
|
||||
|
Reference in New Issue
Block a user