forked from qt-creator/qt-creator
Add debug helper for std::variant
Change-Id: Ifb2f47203fb5c101be5b2180693e39ba07b90c2e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1068,6 +1068,16 @@ def qdump__std____1__valarray(d, value):
|
||||
d.putItemCount(size)
|
||||
d.putPlotData(begin, size, innerType)
|
||||
|
||||
def qdump__std__variant(d, value):
|
||||
which = int(value["_M_index"])
|
||||
type = d.templateArgument(value.type, which)
|
||||
d.putValue("<%s:%s>" % (which, type.name))
|
||||
|
||||
d.putNumChild(1)
|
||||
if d.isExpanded():
|
||||
storage = value["_M_u"]["_M_first"]["_M_storage"]
|
||||
with Children(d, 1):
|
||||
d.putSubItem("value", storage.cast(type))
|
||||
|
||||
def qform__std__vector():
|
||||
return [DisplayFormat.ArrayPlot]
|
||||
|
Reference in New Issue
Block a user