D25741: Add case-insensitive sorting for all role-types

Méven Car noreply at phabricator.kde.org
Sun Dec 15 07:11:11 GMT 2019


meven requested changes to this revision.
meven added a comment.
This revision now requires changes to proceed.


  I have tested the patch on tags, it works.
  It does not break existing tests.

INLINE COMMENTS

> kfileitemmodel.cpp:1190
>  
> -    if (m_sortRole == NameRole && m_naturalSorting) {
> +    if (m_naturalSorting && (m_sortRole == NameRole ||
> +                             m_sortRole == TypeRole ||

We need to change also ine 1207 :

  parallelMergeSort(newItems.begin(), newItems.end(), nameLessThan, QThread::idealThreadCount());

The nameLess function compare the name role of items, it needs to be adapted or replaced so that this the string comparison function called by parallelMergeSort takes into account the sorted Roles.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D25741

To: gvgeo, #dolphin, nicolasfella, meven
Cc: meven, kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191215/b280f5ec/attachment.htm>


More information about the kfm-devel mailing list