forked from qt-creator/qt-creator
Dumper: Fix Environment dumper
Change-Id: I48349ca550981d19cf0087bccd38e4d2677d1897 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -263,8 +263,20 @@ def qdump__Utils__Environment(d, value):
|
|||||||
qdump__Utils__NameValueDictionary(d, value)
|
qdump__Utils__NameValueDictionary(d, value)
|
||||||
|
|
||||||
|
|
||||||
|
def qdump__Utils__DictKey(d, value):
|
||||||
|
d.putStringValue(value["name"])
|
||||||
|
|
||||||
|
|
||||||
def qdump__Utils__NameValueDictionary(d, value):
|
def qdump__Utils__NameValueDictionary(d, value):
|
||||||
dptr = d.extractPointer(value["m_values"])
|
dptr = d.extractPointer(value)
|
||||||
|
if d.qtVersion() >= 0x60000:
|
||||||
|
if dptr == 0:
|
||||||
|
d.putItemCount(0)
|
||||||
|
return
|
||||||
|
m = value['d']['d']['m']
|
||||||
|
d.putItem(m)
|
||||||
|
d.putBetterType('Utils::NameValueDictionary')
|
||||||
|
else: # Qt5
|
||||||
(ref, n) = d.split('ii', dptr)
|
(ref, n) = d.split('ii', dptr)
|
||||||
d.check(0 <= n and n <= 100 * 1000 * 1000)
|
d.check(0 <= n and n <= 100 * 1000 * 1000)
|
||||||
d.check(-1 <= ref and ref < 100000)
|
d.check(-1 <= ref and ref < 100000)
|
||||||
@@ -274,7 +286,7 @@ def qdump__Utils__NameValueDictionary(d, value):
|
|||||||
if n > 10000:
|
if n > 10000:
|
||||||
n = 10000
|
n = 10000
|
||||||
|
|
||||||
typeCode = 'ppp@{%s}@{%s}' % ("Utils::DictKey", "QString")
|
typeCode = 'ppp@{%s}@{%s}' % ("Utils::DictKey", "@QPair<@QString,bool>")
|
||||||
|
|
||||||
def helper(node):
|
def helper(node):
|
||||||
(p, left, right, padding1, key, padding2, value) = d.split(typeCode, node)
|
(p, left, right, padding1, key, padding2, value) = d.split(typeCode, node)
|
||||||
|
Reference in New Issue
Block a user