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



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">These are all kind of micro-optimizations, but then again you did say 'krazy fixes', which is what these normally are. :)

See the notes though, especially for the qBound().</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/114217/diff/1/?file=221807#file221807line209" style="color: black; font-weight: bold; text-decoration: underline;">mpris2/mediaplayer2player.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QVariantMap MediaPlayer2Player::Metadata() const</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">209</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n"><span class="hl">Q</span>Url</span><span class="o">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">playingFile</span><span class="p">.</span><span class="n">absFilePath</span><span class="p">()).</span><span class="n">toEncoded</span><span class="p">());</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">209</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n"><span class="hl">K</span>Url</span><span class="o">::</span><span class="n">fromLocalFile</span><span class="p">(</span><span class="n">playingFile</span><span class="p">.</span><span class="n">absFilePath</span><span class="p">()).</span><span class="n">toEncoded</span><span class="p">());</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">KUrl doesn't actually have a .toEncoded() method, it inherits the one from QUrl, so I don't think this is actually appreciably different. Of course by the same token there's nothing wrong with using KUrl here either, except perhaps for the little bit of addition constructor/destructor time.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/114217/diff/1/?file=221810#file221810line165" style="color: black; font-weight: bold; text-decoration: underline;">volumepopupbutton.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">VolumePopupButton::mouseReleaseEvent( QMouseEvent * event )</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">165</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">float</span> <span class="n">volume</span> <span class="o">=</span> <span class="n">qBound</span><span class="p">(</span> <span class="mf">0.0</span><span class="p">,</span> <span class="n">player</span><span class="o">-></span><span class="n">volume</span><span class="p">()</span> <span class="o">+</span> <span class="kt">float</span><span class="p">(</span> <span class="n">event</span><span class="o">-></span><span class="n">delta</span><span class="p">()</span> <span class="p">)</span> <span class="o">/</span> <span class="mf">4000.0</span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="mf">1.0</span> <span class="p">);</span>
 </pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">165</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">float</span> <span class="n">volume</span> <span class="o">=</span> <span class="n">qBound</span><span class="p">(</span> <span class="kt"><span class="hl">float</span></span><span class="p"><span class="hl">(</span></span><span class="mf">0.0</span><span class="p"><span class="hl">)</span>,</span> <span class="n">player</span><span class="o">-></span><span class="n">volume</span><span class="p">()</span> <span class="o">+</span> <span class="kt">float</span><span class="p">(</span> <span class="n">event</span><span class="o">-></span><span class="n">delta</span><span class="p">()</span> <span class="p">)</span> <span class="o">/</span> <span class="kt"><span class="
 hl">float</span></span><span class="p"><span class="hl">(</span></span><span class="mf">4000.0</span><span class="p"><span class="hl">),</span></span><span class="hl"> </span><span class="kt
 "><span class="hl">float</span></span><span class="p"><span class="hl">(</span></span><span class="mf">1.0</span><span class="p"><span class="hl">)</span></span> <span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Instead of using float(0.0) you can use 0.0f (note the suffix) which lets the compiler know that the number is supposed to be of type float instead of double. This would reduce the number of unsightly casts while still fixing compiler warnings.</pre>
</div>
<br />



<p>- Michael Pyne</p>


<br />
<p>On November 29th, 2013, 9:56 p.m. UTC, Shubham Chaudhary wrote:</p>








<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 KDE Multimedia and Michael Pyne.</div>
<div>By Shubham Chaudhary.</div>


<p style="color: grey;"><i>Updated Nov. 29, 2013, 9:56 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
juk
</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;">Changes: 
* single quote chars
* casted floats to qBound
* KUrl instead of QUrl
* removed empty spaces
* added newline at eof</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;">build and run</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>lyricswidget.cpp <span style="color: grey">(7bb591a)</span></li>

 <li>mpris2/mediaplayer2player.cpp <span style="color: grey">(fe9b6b7)</span></li>

 <li>scrobbleconfigdlg.h <span style="color: grey">(8be1589)</span></li>

 <li>scrobbler.cpp <span style="color: grey">(0c5a5b9)</span></li>

 <li>volumepopupbutton.cpp <span style="color: grey">(5ac5e93)</span></li>

</ul>

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







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








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