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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://reviewboard.kde.orgrb/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 Plasma.</div>
<div>By Rafa? Mi?ecki.</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;">Currently we always display one brightness slider, even if there is not br device at all (see bug #199520) or if there are more devices that should be controlled.

With this patch we fetch all devices and generate one label&amp;slider pair for each.

The most confusing thing for me in implementation was storing list of sliders assigned to devices names. For that purpose I introduced struct BrightnessSet. I don&#39;t know if it is clean and acceptable solution, however keeping something like
QMap&lt;QPair&lt;Plasma::Label *, Plasma::Slider *&gt; &gt; *m_brightnessControlls
didn&#39;t sound too great to me.</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;">I don&#39;t have two brightness devices, so I didn&#39;t test that part.

After removing &quot;video&quot; kernel module I didn&#39;t get any slider which is good.

I also put some:
qDebug() &lt;&lt; &quot;setting&quot; &lt;&lt; bs-&gt;device
to make sure my list of names and sliders works fine.</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="https://bugs.kde.org/show_bug.cgi?id=199520">199520</a>


</div>


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

 <li>/trunk/KDE/kdebase/workspace/plasma/generic/applets/battery/battery.h <span style="color: grey">(1156862)</span></li>

 <li>/trunk/KDE/kdebase/workspace/plasma/generic/applets/battery/battery.cpp <span style="color: grey">(1156862)</span></li>

</ul>

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




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




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