<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127570/">https://git.reviewboard.kde.org/r/127570/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 4th, 2016, 11:57 p.m. CEST, <b>Aleix Pol Gonzalez</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">+1 from my side, although I don't know about the codebase, you seem to know what you're doing.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Would it be possible to set up some automated testing system?</p></pre>
 </blockquote>




 <p>On April 5th, 2016, 8:40 a.m. CEST, <b>Maurizio Paolini</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I contributed a lot to kig in the past... however I come from the "C" world, not C++ (with its misteries :)
No idea how to set up a testing system; at least it requires some way to simulate the user interaction...
Concerning this proposal: actually there is a very little backward compatibility issue: the case of a user
that saved a kig construction that used e.g. the "firstEndPoint" of an arc by 3 points (constructed as a property of the
arc, not the point used to construct the arc), with the save file made <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">after</em> moving points to change the
concavity of the arc.   This is a risk that is even smaller than the one considered in my other review request:
https://git.reviewboard.kde.org/r/127364/ where I actually introduced the "orientability" of circles/arcs.
In that case, avoiding the backward compatibility issue was possible, but at the cost of a much less clean code.
All in all, considering that I estimate as "zero" the number of such saved kig files, I decided to follow the
cleaner path.</p></pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">We can help you on the C++ side of things.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Regarding testing, you can look up QtTest: http://doc.qt.io/qt-5/qtest-overview.html. Many projects have automated tests, you can test how they do that.</p></pre>
<br />










<p>- Aleix</p>


<br />
<p>On April 4th, 2016, 5:49 p.m. CEST, Maurizio Paolini wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDE Edu and David Narváez.</div>
<div>By Maurizio Paolini.</div>


<p style="color: grey;"><i>Updated April 4, 2016, 5:49 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kig
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">ArcBTPType can change concavity upon moving the defining points.  In such a situation the construction of the firstEndPoint and secondEndPoint properties get swapped and can lead to subsequent constructions that change abruptly.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Similarly the getPoint and getParam methods (that transform parameter t in [0,1] to a point in the arc and viceversa) is
not defined smoothly upon change of concavity.
A consequence of this is e.g. the sudden change of position of labels attached to an arc when the arc changes concavity.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The first problem is addressed by a test in the firstEndPoint and secondEndPoint methods.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The second problem is addressed by changing t in 1-t in both getParam and getPoint methods when mradius < 0.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The first problem can be made apparent with the following construction:</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Construct an arc by three points (say A, P, B)</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Hide points A and B</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Right-click on the arc and select Construct->First End Point</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Move point P so that the the arc becomes a segment and then changes its concavity</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Without the proposed patch observe the sudden jump of the newly created point</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Similarly, the second problem becomes apparent with the further step:</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Right-click on the arc (in a position near an end-point) and select "Add Text Label->(any choice)"</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Move point P as before</li>
</ol></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>objects/other_imp.cc <span style="color: grey">(7bc143e)</span></li>

</ul>

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



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


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/0d3f9dc5-06eb-4ec1-8b54-57ffc0c97b10__arc_param.kig">kig construction showing the problem</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/b8532477-262c-4d0a-9c19-a1b3ce0e98a3__arc_param.png">snapshot of the kig file construction</a></li>

</ul>




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







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