<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="http://git.reviewboard.kde.org/r/105428/">http://git.reviewboard.kde.org/r/105428/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <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'm okay with this change, and yes let's backport too</pre>
 <br />







<p>- C.</p>


<br />
<p>On July 5th, 2012, 1:18 p.m., Friedrich W. H. Kossebau wrote:</p>






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

<div>Review request for Calligra.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated July 5, 2012, 1:18 p.m.</i></p>






<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;">Real reason for this patch is that KFileItem::pixmap(...) is broken for items constructed with KFileItem(mode_t, mode_t, KUrl, bool) and no other mimetype related call before the one to ::pixmap. It will always return a pixmap with the "unknown" icon.
You can see this for files for which there is no preview created (for whatever reason).

But the patch fixes also the size mismatch between the fetched previews (200x200) and the usual ODF preview of 128x128 as well as that the preview just from the icon is set in size 128. And makes the code shorter.

Also load the big previews only on-demand, not by default. Could spare up to ~500 kB (10 files * (128*128 - 64*64) * 4 bytes) in theory, but I did not measure what the real effect is.

Also using KIcon instead of setting an own deep copy of the pixmap per each KoFileListItem should spare even more memory, due to KIcon reusing existing icon pixmaps.

Okay to backport to 2.5 as well?</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;">Tried the recent template pane at least in Krita, Words, Sheets</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>libs/main/KoDetailsPane.h <span style="color: grey">(6da6133)</span></li>

 <li>libs/main/KoDetailsPane.cpp <span style="color: grey">(8aa5965)</span></li>

 <li>libs/main/KoRecentDocumentsPane.h <span style="color: grey">(98baeb8)</span></li>

 <li>libs/main/KoRecentDocumentsPane.cpp <span style="color: grey">(521c7e6)</span></li>

 <li>libs/main/KoTemplatesPane.cpp <span style="color: grey">(cc76c05)</span></li>

</ul>

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




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








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