<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/116952/">https://git.reviewboard.kde.org/r/116952/</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;">Another reason to get rid of prefixes indeed.</pre>
 <br />









<p>- David Faure</p>


<br />
<p>On March 21st, 2014, 3:41 p.m. UTC, Alex Merry 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 Alex Merry.</div>


<p style="color: grey;"><i>Updated March 21, 2014, 3:41 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kservice
</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;">Make sure non-prefixed desktop files win when looking up by name

The existing code resolved all the overrides (based on storage id), then
if there were multiple desktop files with the same id (say
"konsole.desktop" and "kde4/konsole.desktop"), it would arbitrarily (due
to the use of QHash) pick one of them to return from
KService::serviceByDesktopName(), regardless of where in XDG_DATA_DIRS
it was found.

So you might get serviceByDesktopName("konsole") giving you
"kde4/konsole.desktop" and serviceByDesktopName("amarok") giving you
"amarok.desktop" (even if "kde4/amarok.desktop" also exists).

This change makes desktop files without a prefix (like
"konsole.desktop") override ones with a prefix (like
"kde4/konsole.desktop").  If you also have "kde5/konsole.desktop", the
ordering between that and "kde4/konsole.desktop" is still arbitrary, and
the order of XDG_DATA_DIRS is ignored.

Remove the prefix hacks from KService::serviceByDesktopName()

These didn't work; the desktop file "kde4/konsole.desktop" will only be
listed under the desktop name "konsole", not under the name
"kde4-konsole".

Add a test app for the KService::serviceBy* methods</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;">Tested using the new test app.</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/kbuildsycoca/kbuildservicefactory.cpp <span style="color: grey">(4dbb44b7db1a8bc4182899485db9c45c063c9b52)</span></li>

 <li>src/services/kservice.cpp <span style="color: grey">(192682b514a69c41fb84231f3b04ec6e9218d587)</span></li>

 <li>tests/CMakeLists.txt <span style="color: grey">(47894e5a6175dac924c2e700b2dafe936590cc1b)</span></li>

 <li>tests/findservice.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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







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








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