Skip to content

Commit

Permalink
issue #10776 Provide the ability to sort implemented/re-implemented list
Browse files Browse the repository at this point in the history
In principle members are already sorted, but this is based on the name, it should also be done on the qualified name.
(sorting is a difficult topic as there are multiple thoughts about what the correct order of the sorting might be).
  • Loading branch information
albert-github committed Apr 2, 2024
1 parent 19436e4 commit 420b8f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/memberlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ int genericCompareMembers(const MemberDef *c1,const MemberDef *c2)
}
// sort on name
int cmp = qstricmp(c1->name(),c2->name());
// then on qualified name
if (cmp==0)
{
cmp = qstricmp(c1->qualifiedName(),c2->qualifiedName());
}
// then on argument list
if (cmp==0 && !c1->argsString().isEmpty() && !c2->argsString().isEmpty())
{
Expand Down

0 comments on commit 420b8f4

Please sign in to comment.