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




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://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 Solid, Dan Vrátil and Lukáš Tinkl.</div>
<div>By Àlex Fiestas.</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;">Short: Do we need to clean the cache at all? I have been running my system without it and everything seems to work. Code-wise it looks like everything gets updated properly so there is no reason to refresh the cache. Finally mind that allDevices is public API, it can be called (and it is called) many times, so the cache becomes useless for those cases.

Long vers
By deleting DeviceBackend we are invalidating all UDisks2::Devices that are in libsolid frontend, since their m_backend will be 0. Nothing will crash just those Devices will be dummy generating things like: http://wstaw.org/m/2013/07/30/plasma-desktopnX2345.png 

A testcase would be:
//We keep a copy of the Device retruned by UdisksManager::createDevice, this is done internally by libsolid frontend
QList<Solid::Device> all = Solid::Device::allDevices();
//We clean the cache
Solid::Device::allDevices();
QList<Solid::Device> devices = Solid::Device::listFromQuery("IS StorageDrive", "");
qDebug() << devices.isEmpty()

devices.isEmpty will be empty since libsolid won't be able to identify any of the devices as "StorageDrive" since they will be dummy.

Fixes: https://bugs.kde.org/show_bug.cgi?id=314544
       https://bugs.kde.org/show_bug.cgi?id=317485
       </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;">Executed Dolphin/KWrite/Amarok/KDevelop all of them:
-Shown the correct list of devices
-Reacted correctly on device added/removed
-Reacted correctly on deviceChanges

</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>solid/solid/backends/udisks2/udisksmanager.cpp <span style="color: grey">(e76dfd1)</span></li>

</ul>

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







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




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