Commit ff94d06a authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: fix gcc 4.4's std::map display

Was mentioned at

http://www.qtcentre.org/threads/41700-How-to-watch-STL-containers-iterators-during-debugging.

gcc 4.4 does not encode the allocator type properly so it can't be used
to extract the 'pair type' in the dumper.

Change-Id: I2cb09ce59865a87dc954fce433aef4826111a95a
Reviewed-on: http://codereview.qt.nokia.com/632

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 17992152
......@@ -1799,7 +1799,11 @@ def qdump__std__map(d, item):
if d.isExpanded(item):
keyType = templateArgument(item.value.type, 0)
valueType = templateArgument(item.value.type, 1)
pairType = templateArgument(templateArgument(item.value.type, 3), 0)
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
# pairType = templateArgument(templateArgument(item.value.type, 3), 0)
# So use this as workaround:
pairType = templateArgument(impl.type, 1)
isSimpleKey = isSimpleType(keyType)
isSimpleValue = isSimpleType(valueType)
innerType = pairType
......
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