[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 128574: Enable natural sorting on QCollator in KDirSortFilterProxyModel
From:       Mathis Beer <mathis_beer () yahoo ! de>
Date:       2017-04-27 23:59:55
Message-ID: 20170427235955.5759.88407 () mimi ! kde ! org
[Download RAW message or body]

--===============5428982353544155426==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


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

(Updated April 27, 2017, 11:59 p.m.)


Review request for KDE Frameworks, David Faure, Nick Shaforostoff, and Harald Sitter.


Changes
-------

Ah, you're right of course. Change to also disable natural sorting when the \
configuration flag becomes unset. (Tested and works at least for the default case.)


Bugs: 343452
    https://bugs.kde.org/show_bug.cgi?id=343452


Repository: kio


Description
-------

KDirSortFilterProxyModel is advertised in the header as performing a "natural sort", \
ie. "7 8 9 10 11", instead of a lexical "10 11 7 8 9". However, as far as I can tell \
this was never true from the start, since the collator responsible for the actual \
sorting did not have the requisite numeric mode enabled, and this setting has always \
been off by default as far back as I can find docs for it (Qt 5.2).

(Dolphin, which offers "natural sort", did not run into this issue because it does \
not actually use KDirSortFilterProxyModel.)


Diffs (updated)
-----

  src/filewidgets/kdirsortfilterproxymodel.cpp 89505ac 

Diff: https://git.reviewboard.kde.org/r/128574/diff/


Testing
-------

Create a folder with three images, "File 1.png", "File 10.png", "File 2.png".
View the folder in Gwenview with sort order set to "Name". The sort order is "File \
1.png, File 10.png, File 2.png". Apply patch.
View the folder in Gwenview with sort order set to "Name". The sort order is "File \
1.png, File 2.png, File 10.png".


Thanks,

Mathis Beer


--===============5428982353544155426==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/128574/">https://git.reviewboard.kde.org/r/128574/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks, David Faure, Nick Shaforostoff, and Harald \
Sitter.</div> <div>By Mathis Beer.</div>


<p style="color: grey;"><i>Updated April 27, 2017, 11:59 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Ah, you're right of course. Change to also disable \
natural sorting when the configuration flag becomes unset. (Tested and works at least \
for the default case.)</p></pre>  </td>
 </tr>
</table>





<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=343452">343452</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">KDirSortFilterProxyModel is advertised in the header \
as performing a "natural sort", ie. "7 8 9 10 11", instead of a lexical "10 11 7 8 \
9". However, as far as I can tell this was never true from the start, since the \
collator responsible for the actual sorting did not have the requisite numeric mode \
enabled, and this setting has always been off by default as far back as I can find \
docs for it (Qt 5.2).</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">(Dolphin, which offers "natural sort", \
did not run into this issue because it does not actually use \
KDirSortFilterProxyModel.)</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Create a folder with three images, "File 1.png", "File \
10.png", "File 2.png". View the folder in Gwenview with sort order set to "Name". The \
sort order is "File 1.png, File 10.png, File 2.png". Apply patch.
View the folder in Gwenview with sort order set to "Name". The sort order is "File \
1.png, File 2.png, File 10.png".</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>src/filewidgets/kdirsortfilterproxymodel.cpp <span style="color: \
grey">(89505ac)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/128574/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>


--===============5428982353544155426==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic