Commit 4a08c9a3 authored by hjk's avatar hjk
Browse files

debugger: adjust format of item count after f9eea7e1

parent 718c08a0
......@@ -1179,7 +1179,7 @@ class Dumper:
with SubItem(self):
self.put('iname="%s",' % item.iname)
self.putName(item.name)
self.putItemCount(select(n <= 100, n, "> 100"))
self.putItemCount(n, 100)
self.putType(type)
self.putNumChild(n)
if self.isExpanded(item):
......@@ -1313,9 +1313,12 @@ class Dumper:
return xrange(qmin(self.currentMaxNumChilds, self.currentNumChilds))
# Convenience function.
def putItemCount(self, count):
def putItemCount(self, count, maximum = 1000000000):
# This needs to override the default value, so don't use 'put' directly.
self.putValue('<%s items>' % count)
if count > maximum:
self.putValue('<>%s items>' % maximum)
else:
self.putValue('<%s items>' % count)
def putEllipsis(self):
self.put('{name="<incomplete>",value="",type="",numchild="0"},')
......
......@@ -2048,7 +2048,7 @@ def qdump__std__list(d, item):
size += 1
p = p["_M_next"]
d.putItemCount(select(size <= 1000, size, "> 1000"))
d.putItemCount(size, 1000)
d.putNumChild(size)
if d.isExpanded(item):
......
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