<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/127912/">https://git.reviewboard.kde.org/r/127912/</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, 2016, 1:59 p.m. UTC, <b>David Faure</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But how is the app supposed to then choose which protocol to use?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If it needs its own setting for the preferred kioslave, then what's the point of the query that returns a list?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In other words, if you know you want to prefer krarc, why not just query whether krarc is available and use it if yes?</p></pre>
 </blockquote>




 <p>On May 14th, 2016, 4:51 p.m. UTC, <b>Martin Kostolný</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm sorry, it is very well possible that I don't know the required API for these queries. It is as You said: basically I need to test whether krarc:/ is available and I also need to test if given mimetype can be handled by krarc protocol. Is there a way to achieve that with current KIO API? Thanks!</p></pre>
 </blockquote>





 <p>On May 22nd, 2016, 5:21 p.m. UTC, <b>David Faure</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To find if krarc is available, use KProtocolInfo::isKnownProtocol("krarc").</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To find which archive mimetypes "krarc" can support, hmm, there was no API for it, so I just added it. KProtocolInfo::archiveMimeTypes("krarc"), requires KF 5.23 (released next month).
See http://commits.kde.org/kio/a60c6c437067c9daa2b5bbe6638ba4080342dacf</p></pre>
 </blockquote>





 <p>On May 23rd, 2016, 4:48 a.m. UTC, <b>Martin Kostolný</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Perfect, thanks a lot! :-)</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sorry for bothering again. The new KProtocolManager::protocolsForArchiveMimetype(...) is not included in final KF 5.23 package. I'm saying that only to let you know. I'm not sure how exactly version tagging workflow works - should I inform somebody else who e.g. picks commits to created version tags?</p></pre>
<br />










<p>- Martin</p>


<br />
<p>On May 23rd, 2016, 4:49 a.m. UTC, Martin Kostolný wrote:</p>








<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, Krusader, David Edmundson, David Faure, and Marco Martin.</div>
<div>By Martin Kostolný.</div>


<p style="color: grey;"><i>Updated May 23, 2016, 4:49 a.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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KProtocolManager has a method called protocolForArchiveMimetype. It gives one protocol for given mimetype even if there exist more then one protocol capable of handling this mimetype.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I suggest adding a method called protocolsForArchiveMimetype (note the "s") which would give us all protocols that can handle given mimetype. I also suggest to add a method for giving all archive mimetypes for given protocol.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This request is based on a potential need of some apps to prioritize one protocol over others (specifically krarc:/ from Krusader over other archive-handling protocols).</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;">I've tested both methods through Krusader code. Partially covered in this phabricator task: https://phabricator.kde.org/T2401</p></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/core/kprotocolmanager.h <span style="color: grey">(13b8c07)</span></li>

 <li>src/core/kprotocolmanager.cpp <span style="color: grey">(9a0a96f)</span></li>

</ul>

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






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







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