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








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 26th, 2010, 8:12 a.m., <b>Marco Martin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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://svn.reviewboard.kde.org/r/5617/diff/1/?file=39260#file39260line36" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.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; ">Fifteen::Fifteen(QGraphicsItem* parent, int size)</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">35</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">      <span class="n">m_size</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="c1">// this will get overwritten in setSize(), but needs an initial value</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">36</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">      <span class="n">m_size</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="c1">// this will get overwritten in setSize(), but needs an initial value</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">shouldn&#39;t be 0</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The reason I set it to 0 here is that I have to call setSize(size) later, and that doesn&#39;t do anything if size == m_size.
It should be safe though, because nothing uses m_size between here and the call to setSize(size). I&#39;ve updated the comment to make this more clear.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 26th, 2010, 8:12 a.m., <b>Marco Martin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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://svn.reviewboard.kde.org/r/5617/diff/1/?file=39260#file39260line60" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.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; ">void Fifteen::setSize(int size)</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">59</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_size</span> <span class="o">=</span> <span class="n">size</span><span class="p">;</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">60</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_size</span> <span class="o">=</span> <span class="n">size</span><span class="p">;</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">m_size = qMax(size, 1)
you added several foo % m_size, ensuring isn&#39;t 0 is important :)</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Good point, thanks. I&#39;ve just fixed in my local copy.
I&#39;ll commit in a few minutes.</pre>
<br />




<p>- Anthony</p>


<br />
<p>On October 13th, 2010, 1:40 p.m., Anthony Bryant wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.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 Anthony Bryant.</div>


<p style="color: grey;"><i>Updated 2010-10-13 13:40:36</i></p>




<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;">Lots more improvements to the fifteen puzzle:
* Improved shuffle algorithm
* Resize fonts when the board size is changed
* Better checking for whether the board is solved
* Stop the pieces flickering when they are moved
* Changed the way board positions are stored
* Animate in the blank piece when the puzzle is solved
* Add a status bar underneath the puzzle, which shows a shuffle button and the time elapsed</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;">Solved the puzzle a few times, changed some settings, resized the applet.</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=156648">156648</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/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.h <span style="color: grey">(1185297)</span></li>

 <li>/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteen.cpp <span style="color: grey">(1185297)</span></li>

 <li>/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.h <span style="color: grey">(1185297)</span></li>

 <li>/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/fifteenPuzzle.cpp <span style="color: grey">(1185297)</span></li>

 <li>/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.h <span style="color: grey">(1185297)</span></li>

 <li>/trunk/KDE/kdeplasma-addons/applets/fifteenPuzzle/src/piece.cpp <span style="color: grey">(1185297)</span></li>

</ul>

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



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

<div>

 <a href="http://svn.reviewboard.kde.org/r/5617/s/535/"><img src="http://svn.reviewboard.kde.org/media/uploaded/images/2010/10/13/fifteen-puzzle_400x100.png" style="border: 1px black solid;" alt="new puzzle layout" /></a>

</div>


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








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