<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/103464/">http://git.reviewboard.kde.org/r/103464/</a>
     </td>
    </tr>
   </table>
   <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/103464/diff/2/?file=45019#file45019line97" style="color: black; font-weight: bold; text-decoration: underline;">core/gdl/objecttreebuilder.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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 ObjectTreeBuilder::visitStart(StartAst* node)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">97</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="c1">// Create relative path</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;">Hmm, I think it works better to make this a three-step process. So first check to see whether it is a relative path and if so, resolve that. If not, check against the object and finally check against the project. Checking whether it is a relative path also needs a better condition than whether or not the parent is set, as they are not mutually exclusive.</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/103464/diff/2/?file=45020#file45020line54" style="color: black; font-weight: bold; text-decoration: underline;">core/gdlserializer.h</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">namespace GluonCore</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">52</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">bool</span> <span class="n">read</span><span class="p">(</span> <span class="k">const</span> <span class="n">QUrl</span><span class="o">&</span> <span class="n">url</span><span class="p">,</span> <span class="n">GluonObjectList</span><span class="o">&</span> <span class="n">objects</span><span class="p">,</span> <span class="n">GluonObject</span><span class="o">*</span> <span class="n">project</span> <span class="o">=</span> <span class="mi">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">54</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">bool</span> <span class="n">read</span><span class="p">(</span> <span class="k">const</span> <span class="n">QUrl</span><span class="o">&</span> <span class="n">url</span><span class="p">,</span> <span class="n">GluonObjectList</span><span class="o">&</span> <span class="n">objects</span><span class="p">,</span> <span class="n">GluonObject</span><span class="o">*</span> <span class="n">project</span> <span class="o">=</span> <span class="mi">0</span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="n"><span class="hl">GluonObject</span></span><span class="o"><span class="hl">*</span></span><span class="hl"> </span><span class="n"><span class="hl">gdlParent</span></span><span class="hl"> </span><span class="o"><span class="hl">=</span></span><span class="hl"> </span><span class="mi"><span class="hl">0</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;">I would prefer it if you just called it parent everywhere, adding the gdl in front of it makes it feel rather ugly.</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/103464/diff/2/?file=45022#file45022line107" style="color: black; font-weight: bold; text-decoration: underline;">engine/assets/other/achievements/achievementsasset.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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 AchievementsAsset::load()</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">107</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span><span class="p">(</span> <span class="o">!</span><span class="n">GluonCore</span><span class="o">::</span><span class="n">GDLSerializer</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">read</span><span class="p">(</span> <span class="n">file</span><span class="p">(),</span> <span class="n">list</span><span class="p">,</span> <span class="n">gameProject</span><span class="p">()</span> <span class="p">)</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">107</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span><span class="p">(</span> <span class="o">!</span><span class="n">GluonCore</span><span class="o">::</span><span class="n">GDLSerializer</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">read</span><span class="p">(</span> <span class="n">file</span><span class="p">(),</span> <span class="n">list</span><span class="p">,</span> <span class="n">gameProject</span><span class="p">()<span class="hl">,</span></span><span class="hl"> </span><span class="k"><span class="hl">static_cast</span></span><span class="o"><span class="hl"><</span></span><span class="n"><span class="hl">AchievementsAsset</span></span><span class="o"><span class="hl">*></span></span><span class="p"><span class="hl">(</span></span><span class="k"><span class="hl">this</span></span><span class="p"><span class="hl">)</span></span> <span class="p">)</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;">Why the cast? "this" will always be an AchievementAsset so it will be optimised away anyway.</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/103464/diff/2/?file=45023#file45023line122" style="color: black; font-weight: bold; text-decoration: underline;">engine/assets/other/statistics/statisticsasset.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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 StatisticsAsset::load()</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">122</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span><span class="p">(</span> <span class="o">!</span><span class="n">GluonCore</span><span class="o">::</span><span class="n">GDLSerializer</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">read</span><span class="p">(</span> <span class="n">file</span><span class="p">(),</span> <span class="n">list</span><span class="p">,</span> <span class="n">gameProject</span><span class="p">()</span> <span class="p">)</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">122</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span><span class="p">(</span> <span class="o">!</span><span class="n">GluonCore</span><span class="o">::</span><span class="n">GDLSerializer</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">read</span><span class="p">(</span> <span class="n">file</span><span class="p">(),</span> <span class="n">list</span><span class="p">,</span> <span class="n">gameProject</span><span class="p">()<span class="hl">,</span></span><span class="hl"> </span><span class="k"><span class="hl">static_cast</span></span><span class="o"><span class="hl"><</span></span><span class="n"><span class="hl">StatisticsAsset</span></span><span class="o"><span class="hl">*></span></span><span class="p"><span class="hl">(</span></span><span class="k"><span class="hl">this</span></span><span class="p"><span class="hl">)</span></span> <span class="p">)</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;">See the comment on AchievementAsset.</pre>
</div>
<br />



<p>- Arjen</p>


<br />
<p>On December 28th, 2011, 6:24 p.m., Felix Rohrbach wrote:</p>






<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 Gluon and Arjen Hiemstra.</div>
<div>By Felix Rohrbach.</div>


<p style="color: grey;"><i>Updated Dec. 28, 2011, 6:24 p.m.</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;">I added a parameter for the gdl file parent, which is used to create relative paths.</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;">- My problem is solved
- Invaders still loads into creator and can be played.</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>core/gdl/objecttreebuilder.h <span style="color: grey">(4c51c9b)</span></li>

 <li>core/gdl/objecttreebuilder.cpp <span style="color: grey">(4dcefa8)</span></li>

 <li>core/gdlserializer.h <span style="color: grey">(e88f179)</span></li>

 <li>core/gdlserializer.cpp <span style="color: grey">(7b27874)</span></li>

 <li>engine/assets/other/achievements/achievementsasset.cpp <span style="color: grey">(3c4937b)</span></li>

 <li>engine/assets/other/statistics/statisticsasset.cpp <span style="color: grey">(a78a67e)</span></li>

</ul>

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




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








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