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

List:       kde-core-devel
Subject:    Review Request: KIO::PreviewJob: Respect the enabled plugins from
From:       "Peter Penz" <peter.penz19 () gmail ! com>
Date:       2011-02-05 19:53:24
Message-ID: 20110205195324.10663.75133 () vidsolbach ! de
[Download RAW message or body]

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

Review request for kdelibs and David Faure.


Summary
-------

Currently KIO::PreviewJob respects the settings "MaximumSize" and "MaximumR=
emoteSize" from the KConfigGroup "PreviewSettings", but completely ignores =
the "Plugins" settings. Because of this in the following locations the plug=
ins 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 con=
structor 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 ze=
ro 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::Sca=
leType 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 seco=
nd commit as it won't change any behavior.


Diffs
-----

  kio/kio/previewjob.cpp 96e5b27 =

  kio/kio/previewjob.h b86fc9b =


Diff: http://git.reviewboard.kde.org/r/100578/diff


Testing
-------

Temporary adjusted KFilePreviewGenerator for testing.


Thanks,

Peter


[Attachment #3 (text/html)]

<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 />


<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>





<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 &quot;MaximumSize&quot; \
and &quot;MaximumRemoteSize&quot; from the KConfigGroup &quot;PreviewSettings&quot;, \
but completely ignores the &quot;Plugins&quot; 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 &quot;Plugins&quot; too. \
Before adding some code again I&#39;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&#39;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 &quot;PreviewSettings&quot; are used now.

If it is OK to merge this patch, I&#39;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&#39;d do this in a second commit as it \
won&#39;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>



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

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