Review Request 130068: Patch to sort the tag-values alphabetically in the "Tags" column of Dolphin.

Mark Gaiser markg85 at gmail.com
Sat Apr 8 17:09:49 BST 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130068/#review103007
-----------------------------------------------------------




src/kitemviews/private/kbaloorolesprovider.cpp (line 162)
<https://git.reviewboard.kde.org/r/130068/#comment68531>

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



src/kitemviews/private/kbaloorolesprovider.cpp (line 163)
<https://git.reviewboard.kde.org/r/130068/#comment68532>

    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.

- Mark Gaiser


On apr 7, 2017, 11:44 a.m., Athanasios Kanellopoulos wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130068/
> -----------------------------------------------------------
> 
> (Updated apr 7, 2017, 11:44 a.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> 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
> 
> 
> Diffs
> -----
> 
>   src/kitemviews/private/kbaloorolesprovider.h a9bd2e8 
>   src/kitemviews/private/kbaloorolesprovider.cpp 16e3935 
> 
> Diff: https://git.reviewboard.kde.org/r/130068/diff/
> 
> 
> Testing
> -------
> 
> 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.
> 
> 
> Thanks,
> 
> Athanasios Kanellopoulos
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20170408/5b7fa9ca/attachment.htm>


More information about the kfm-devel mailing list