Review Request: Fix folderview sorting
Aaron J. Seigo
aseigo at kde.org
Thu Feb 9 18:43:31 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103895/#review10464
-----------------------------------------------------------
Ship it!
Ship It!
- Aaron J. Seigo
On Feb. 9, 2012, 6:22 p.m., Ignat Semenov wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103895/
> -----------------------------------------------------------
>
> (Updated Feb. 9, 2012, 6:22 p.m.)
>
>
> Review request for Plasma, Aaron J. Seigo, Marco Martin, Peter Penz, and Fredrik Höglund.
>
>
> Description
> -------
>
> This patch fixes the inconsistent sorting issues in FolderView.
>
> 1)It introduces explicit support for sorting by size. Prior to the change, sorting by Size was done as follows:convert the size into a string and use KStringHandler::naturalCompare(). Of course, this is not the same as a proper int comparison - FW sorted incorrectly by size.
> 2)Introduce one important concept:fallback to comparing the name if the main sorting column is not enough to determine a sort order. This is especially important for sorting by type - sorting by size needs this as well, but different files are way less likely to have the same size compared to the possibility of them having similar types.
> 3)Intoduce full three-level fallback for ensuring file name uniqueness, taken from Dolphin code. Thanks a bunch goes to Peter Penz :)
> 4)And of course, sort folders by the child count if sorting by size. Again, Dolphin inspired.
>
>
> Diffs
> -----
>
> plasma/applets/folderview/proxymodel.cpp 4b3340e
>
> Diff: http://git.reviewboard.kde.org/r/103895/diff/diff
>
>
> Testing
> -------
>
> Tested, yields results similar to Dolphin sorting of the same folder (surpise! :) ).
>
>
> Thanks,
>
> Ignat Semenov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120209/1e6ef819/attachment.html>
More information about the Plasma-devel
mailing list