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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 14th, 2014, 2:13 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ehh..

Does this mean that there is no way to get the actual byte size anymore?

In that case i think it would be better to introduce a new role: "HumanReadableSize" which does what your patch is doing now.

Note: i really think that this user facing value should be determined in either the view, not the model. Imho the model should always return the byte version where the view formats it to whatever it wants. This also eases sorting.</pre>
 </blockquote>




 <p>On May 14th, 2014, 2:17 p.m. UTC, <b>Martin Klapetek</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't disagree, but since that role already returns formatted bytes string (QLocale().toString(..)), it actually already does not quite return the bytes you might want (some locales have thousands delimiter etc).</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Revising my stance. The format is already "1.000.000" thus breaking sorting since that is just the default QAbstractItemModel::sort which means it's doing a local aware string comparison.

With that in mind: +1 to make it fully human readable thus accepting this patch.

However, it might be good to add a new role called "Bytes". Then KDirModel::sort should use the Bytes role when Size is provided. That should fix sorting based on size.</pre>
<br />










<p>- Mark</p>


<br />
<p>On May 14th, 2014, 2:01 p.m. UTC, Martin Klapetek wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDE Frameworks and David Faure.</div>
<div>By Martin Klapetek.</div>


<p style="color: grey;"><i>Updated May 14, 2014, 2:01 p.m.</i></p>









<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;">Now I'm not sure if returning the unit together with the size won't break some things, but as it returns string already, I thought returning it in the "human readable" form would be better than always returning bytes.</pre>
  </td>
 </tr>
</table>



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

 <li>src/widgets/kdirmodel.cpp <span style="color: grey">(70d5ee4)</span></li>

</ul>

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







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








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