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




<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 Software on Mac OS X, KDE Frameworks and David Faure.</div>
<div>By RenĂ© J.V. Bertin.</div>


<p style="color: grey;"><i>Updated Nov. 21, 2015, 6:57 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Resolves David's last open issue.

I looked at removing the ifdefs around `createInfrastructure()`, but that function cannot be a stub elsewhere but on OS X. So one would either have to add an argument with a platform-dependent default value, or else accept that the infrastructure is checked each time the function is called (even when it's unlikely to be discarded "behind our backs).

Since the topic came up, I've also taken the liberty to convert certain qDebug() calls to qWarning(), and comment most of the remaining ones. It's only on OS X that that output goes into a system log (I hope), and I think this workaround still leaves plenty to discuss on a future RR ;)</pre>
  </td>
 </tr>
</table>







<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;">This is a "backport" of the <a href="https://git.reviewboard.kde.org/r/120573/" style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">kde-runtime modification reviewed here</a> that makes the trash ioslave use a subdirectory in the OS X trashcan.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">From the original review:
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">KDE on OS X does not handle the desktop session (no "Plasma") nor can it rely on XDG to obtain the proper paths to use for something like the trash. As a result, all applications that propose to move things they manage to the wastebin (Dolphin, but also digiKam) will store those items in a place that has no particular meaning on OS X, and that will thus tend to fill up.</em></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">OS X stores trash in one of several locations. Files trashed from the boot volume (and/or the volume containing $HOME, I don't actually know that) end up in ~/.Trash. Files deleted from other volumes end up in /Volumes/volName/.Trashes/uid, where volName is the volume name (regardless whether it's an external or a remote drive; only mounted NFS shares are handled differently) and uid the numerical user id. Permissions on .Trashes are the same as those expected by KDE.</em></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The patch from KDE4 was straightforward to apply as the trash implementation has only had what seem to be cosmetic changes and "Qt4 -> Qt5" adaptations.
Therefore, I have ported my code "as is", so as not to change anything that was discussed and negotiated during the rather lengthy previous review process. The only place where I've had to introduce a small additional change is in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">trashForMountPoint</code>, where KF5 made <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">trashDir</code> a const. Appending the KDE trash-subdir in the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">trashDir</code> declaration might seem the appropriate approach, but since there is no guarantee at that point that the subdirectory actually (still) exists, the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QT_LSTAT</code> test could fail, and the the appending has to be done after the check on the actual host trash directory.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have also introduced a small change in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">testtrash.cpp</code> allowing it to run instead of failing because the 1st location returned <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">trashDirectories()</code> doesn't match the one determined from QSP.</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;">OS X 10.9 with Qt 5.5.1 and KF5rameworks 5.16.0 . The code builds, and the unittests from testtrash succeed (with the Trash open in the Finder one sees the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KDE.trash</code> directory show up while the test runs, and disappear afterwards).</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/ioslaves/trash/CMakeLists.txt <span style="color: grey">(05161cd)</span></li>

 <li>src/ioslaves/trash/kcmtrash.cpp <span style="color: grey">(79c2ca7)</span></li>

 <li>src/ioslaves/trash/tests/CMakeLists.txt <span style="color: grey">(3e138f7)</span></li>

 <li>src/ioslaves/trash/tests/testtrash.cpp <span style="color: grey">(339aa19)</span></li>

 <li>src/ioslaves/trash/trashimpl.h <span style="color: grey">(9886011)</span></li>

 <li>src/ioslaves/trash/trashimpl.cpp <span style="color: grey">(26d9ea8)</span></li>

</ul>

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






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



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