Commit d327a110 authored by hjk's avatar hjk
Browse files

Debugger: Sort vtable before data members



... when listing members of a struct in the Locals and
Expressions view.

Task-number: QTCREATORBUG-14767
Change-Id: I5089dd3bcba40ab335be164c5de2f2d70c3ed4f4
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent a373698b
......@@ -1156,7 +1156,13 @@ class Dumper(DumperBase):
def putFields(self, value, dumpBase = True):
fields = value.type.fields()
if self.sortStructMembers:
fields.sort(key = lambda field: "%d%s" % (not field.is_base_class, field.name))
def sortOrder(field):
if field.is_base_class:
return 0
if field.name.startswith("_vptr."):
return 1
return 2
fields.sort(key = lambda field: "%d%s" % (sortOrder(field), field.name))
#warn("TYPE: %s" % value.type)
#warn("FIELDS: %s" % fields)
......
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