<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/100578/">http://git.reviewboard.kde.org/r/100578/</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;">Looks good, nice cleanup and fix, thanks.
Long ago the idea was just "if the app doesn't specify plugins, then use them all". But if it's configurable nowadays, then better respect the user's wishes indeed.</pre>
 <br />





<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/100578/diff/1/?file=8459#file8459line286" style="color: black; font-weight: bold; text-decoration: underline;">kio/kio/previewjob.h</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 ); // KDE5: use enums instead of bool scale + bool save</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">namespace KIO {</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">286</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KDE_DEPRECATED</span> <span class="n">KIO_EXPORT</span> <span class="n">PreviewJob</span> <span class="o">*</span><span class="n">filePreview</span><span class="p">(</span> <span class="k">const</span> <span class="n">KUrl</span><span class="o">::</span><span class="n">List</span> <span class="o">&</span><span class="n">items</span><span class="p">,</span> <span class="kt">int</span> <span class="n">width</span><span class="p">,</span> <span class="kt">int</span> <span class="n">height</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="kt">int</span> <span class="n">iconSize</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="kt">int</span> <span class="n">iconAlpha</span> <span class="o">=</span> <span class="mi">70</span><span class="p">,</span> <span class="n">bool</span> <span class="n">scale</span> <span class="o">=</span> <span class="nb">true</span><span class="p">,</span> <span class="n">bool</span> <span class="n">save</span> <span class="o">=</span> <span class="nb">true</span><span class="p">,</span> <span class="k">const</span> <span class="n">QStringList</span> <span class="o">*</span><span class="n">enabledPlugins</span> <span class="o">=</span> <span class="mi">0</span> <span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think this has to be KIO_EXPORT_DEPRECATED instead (for Windows in particular).</pre>
</div>
<br />



<p>- David</p>


<br />
<p>On February 5th, 2011, 7:53 p.m., Peter Penz wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/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 kdelibs and David Faure.</div>
<div>By Peter Penz.</div>


<p style="color: grey;"><i>Updated Feb. 5, 2011, 7:53 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;">Currently KIO::PreviewJob respects the settings "MaximumSize" and "MaximumRemoteSize" from the KConfigGroup "PreviewSettings", but completely ignores the "Plugins" settings. Because of this in the following locations the plugins are manually read and passed to KIO::PreviewJob:
- Tooltips in Dolphin/Konqueror
- Information Panel in Dolphin
- KFilePreviewGenerator in kdelibs

Recently it turned out that the file-open-dialog ignores the "Plugins" too. Before adding some code again I've provided this patch for KIO::PreviewJob. Changing the current behavior of KIO::PreviewJob cannot be done, so a new constructor has been added. Following Qt's constructor-pattern the new constructor is quite minimal and setter/getter-methods have been added for the missing parameters.

The changed behavior of the new constructor is that if enabledPlugins is zero the plugins from "PreviewSettings" are used now.

If it is OK to merge this patch, I'd take care to replace the calls to the deprecated API within kdelibs + kdebase.

Also it might be useful to change the implementation to use PreviewJob::ScaleType internally instead of the two bools bScale and bSave (the ScaleType has been introduced because of the KDE5 comment). But I'd do this in a second commit as it won't change any behavior.
</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;">Temporary adjusted KFilePreviewGenerator for testing.</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>kio/kio/previewjob.cpp <span style="color: grey">(96e5b27)</span></li>

 <li>kio/kio/previewjob.h <span style="color: grey">(b86fc9b)</span></li>

</ul>

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




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








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