Patch to sort the tag-values alphabetically in the "Tags" column of Dolphin.

Review Request #130068 - Created April 7, 2017 and updated

Information
Athanasios Kanellopoulos
dolphin
Reviewers
dolphin

Up until now tag-values have appeared unsorted in the Tags column
when the selected View Mode is "Details".
In older versions of Dolphin (in KDE4) the tags-values were
alphabetically sorted in the Tags column, which means that back then
this was the desired behavior.
This commit restores this functionality.

Related to the following commit:
https://github.com/KDE/dolphin/pull/1/commits/12b82915f7c15ddb3b5c647bfd5ce2e2cdbe734c

I built dolphin on my "KDE Neon Developer Edition" environment having applied this patch. No problems appeared during the build.

The tag-values now appear sorted alphabetically in the "Tags" column of Dolphin.

No further testing done.

Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
The naming is wrong. As you can see in the rest of the code, the "camelCase" principle is used, not ... Mark Gaiser Mark Gaiser
This is probably not an "alphabetical order" sort, even though it might seem OK in most cases. This is the ... Mark Gaiser Mark Gaiser
Mark Gaiser

   

The naming is wrong. As you can see in the rest of the code, the "camelCase" principle is used, not "camel_case".

This is probably not an "alphabetical order" sort, even though it might seem OK in most cases.

This is the machine sort. So for instance: 9, 3, 5 will become:
3
5
9

That is "alphabetical", but only because there is no number bigger than 9. This: 9, 3, 10, 5
will become:
10
3
5
9

That is not alphabetical.

You need to use QCollator and QCollatorSortKey to get real sorting that we - humans - call natural :)
What you did is likely oke in most cases. Till someone decides to make tags with numbers in them, then you'd hit the issue i just described.

Regarding your pull request. I doubt that is useful on github since it is the KDE mirror. The "live" version lives on cgit.kde.org.
I don't really know how that is suppoed to be handled though.

Loading...