diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 045bf0919e4..2ccdd2347aa 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -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="",value="",type="",numchild="0"},') diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index e7bc5be249d..7552eaa588e 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -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):