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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Solid.</div>
<div>By Kai Uwe Broulik.</div>


<p style="color: grey;"><i>Updated Oct. 30, 2012, 7:56 a.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;">Move battery charge percent notification handling into its own function so we cann call it whenever we feel like it without needing to fuzz around in the signals/slots.

Only problem we now have is that the battery low notification gets emitted way before the workspace is up resulting in a similar ugly notification like the "Profile error" thing. The checkBattery() function is invoked delayed by 30 seconds but how can I make it only delay it only when starting the session? The notifiation is triggered from batteryAdded slot, which seems to be invoked quite early in the process. So I cannot just add a timer, otherwise, if a battery gets added, the user will get the notification that the new battery is low much later.</pre>
  </td>
 </tr>
</table>




<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;">When starting the system while the battery is already below the warning/critical battery level threshold, there will be no notification about that.
This patch fixes this by introducing a m_batteriesPercentNotified bool that is false on startup and if it is false, the battery low notification will be triggered if the battery is lower or becomes lower than the threshold no matter if it already has been lower.</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;">Set my low battery level to 90% and started the system. Once the desktop was up I got the notification that my battery was low.
I don't know if it is good to also start the suspend timer right when the desktop comes up, though.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=298604">298604</a>


</div>


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

 <li>powerdevil/daemon/powerdevilcore.h <span style="color: grey">(7140051)</span></li>

 <li>powerdevil/daemon/powerdevilcore.cpp <span style="color: grey">(3c40780)</span></li>

</ul>

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




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




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