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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On Сентябрь 16th, 2015, 10:11 д.п. UTC, <b>Kai Uwe Broulik</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 really like that!</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The device notifier UI itself is questionable with the popup telling us "the device xyz failed to unmount" rather than just highlighting the device and showing the message in the list directly but this is of course outside the scope of this patch.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">+1 for adding this into Solid</p></pre>
 </blockquote>




 <p>On Сентябрь 16th, 2015, 10:14 д.п. UTC, <b>Kai Uwe Broulik</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;">Bonus points for querying KService for the pretty application name :) </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">See https://quickgit.kde.org/?p=plasma-workspace.git&a=blob&f=dataengines%2Fpowermanagement%2Fpowermanagementengine.cpp starting on lines 648</p></pre>
 </blockquote>





 <p>On Сентябрь 16th, 2015, 10:47 д.п. UTC, <b>Igor Poboiko</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 was thinking about it, but it turns out it isn't that easy.
Simply looking for name.desktop won't work, since e.g gwenviews desktop name is org.kde.gwenview.desktop.
Another way is using KServiceTypeTrader and looking for applications with Exec match (e.g "exists Exec and ('gwenview' =~ Exec)"), but it didn't work as well, since exec line for gwenview (and a lot of other guys aswell) is "gwenview %U" (no match :( ). Another possible thing is just to check if it contains (i.e "~~" instead of "=~") executable name, but it might get unwanted results, e.g I wanted to look for "ls" and it got me "kmailservice". But then we can filter it by hands.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What do you think?</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;">I think this actually belongs to KService framework. A method like KService::serviceByExecutable(QString) can be implemented there and used in solid (the link you provided); here; and also in plasma-workspace/libtaskmanager (it has also its own routine, which is broken due to reasons I stated above). Maybe somewhere else, I think it might be useful.</p></pre>
<br />










<p>- Igor</p>


<br />
<p>On Сентябрь 16th, 2015, 9:49 п.п. UTC, Igor Poboiko 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 Plasma and Solid.</div>
<div>By Igor Poboiko.</div>


<p style="color: grey;"><i>Updated Сен. 16, 2015, 9:49 п.п.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</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;">An attempt to implement feature from <a href="https://bugs.kde.org/show_bug.cgi?id=96107" style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">bug 96107</a> (see summary).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On umount/eject error it runs "lsof" executable, gets PIDs of blocking processes and obtains names of processes via KSysGuard::Process machinery. Finally it appends obtained information to error message which is shown in tooltip of Device Notifier applet.</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;">Tested unmount on busy device with several processes blocking it. Did not test eject, since I have no optical disc drive :(</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>dataengines/devicenotifications/CMakeLists.txt <span style="color: grey">(3f7fd83)</span></li>

 <li>dataengines/devicenotifications/ksolidnotify.h <span style="color: grey">(a471d50)</span></li>

 <li>dataengines/devicenotifications/ksolidnotify.cpp <span style="color: grey">(35d49d6)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png">Applet with error message</a></li>

</ul>




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







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