<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/101873/">http://git.reviewboard.kde.org/r/101873/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On July 8th, 2011, 4:05 a.m., <b>Thorsten Zachmann</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://git.reviewboard.kde.org/r/101873/diff/1/?file=26227#file26227line47" style="color: black; font-weight: bold; text-decoration: underline;">libs/flake/KoSubpath.h</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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class FLAKE_EXPORT KoSubpath {</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">47</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QList</span><span class="o"><</span><span class="n">KoPathPoint</span> <span class="o">*></span> <span class="o">*</span> <span class="n">points</span><span class="p">;</span></pre></td>
</tr>
<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">48</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">SubpathProperties</span> <span class="n">paintingHints</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;">This break encapsulation. The properties should be moved to a d pointer.
Don't use a pointer for points
QList<KoPathPoint *> points
is much better here
To avoid constructs like
subpath->points->last()
KoSubpath should provide all methods like QList that are used.
so provide methods like last(), size(), begin() ...
directly in KoSubpath.
With that the diff will also be much smaller and it is much nicer api.</pre>
</blockquote>
<p>On July 8th, 2011, 7:01 a.m., <b>Lukáš Tvrdý</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;">Ok, I will.
I though it is better to expose that list as I have to duplicate the last(), size(), etc.
It breaks the encapsulation for sure..</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;">>QList<KoPathPoint *> points
>is much better here
Why not pointer? Originally it was pointer too..</pre>
<br />
<p>- Lukáš</p>
<br />
<p>On July 8th, 2011, 7:02 a.m., Lukáš Tvrdý 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 Calligra, Jan Hambrecht and Thorsten Zachmann.</div>
<div>By Lukáš Tvrdý.</div>
<p style="color: grey;"><i>Updated July 8, 2011, 7:02 a.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;">This patch implements S and F commands in draw:enhanced-path. So far there were no support for this.
The idea is that the path is now rendered per sub-path, because S (no stroke) and F (no fill) can be
specified per subpath in the draw:enhanced-path.
I changed typedef KoSubpath to standalone class as it needs attributes about no fill and no stroke.
I moved the code that operates only on KoSubpath to that class from KoPathShape.
Then I render the output per QPainterPath with appropriate attributes (I turn off the pen temporary if no stroke and turn of the brush if no fill)</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;">From bug 239561:
a) before patch http://wstaw.org/m/2011/07/07/nofill_nostroke_example_before.png
b) with my patch http://wstaw.org/m/2011/07/07/nofill_nostroke_example_after.png
I first managed to break several unit tests (TestPointMergeCommand and TestPathShape),
but I fixed all the problems and no tests are broken by this patch now.
</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="http://bugs.kde.org/show_bug.cgi?id=239561">239561</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>libs/flake/CMakeLists.txt <span style="color: grey">(b9f388f)</span></li>
<li>libs/flake/KoConnectionShape.cpp <span style="color: grey">(210e171)</span></li>
<li>libs/flake/KoPathShape.h <span style="color: grey">(8b54f26)</span></li>
<li>libs/flake/KoPathShape.cpp <span style="color: grey">(da6c928)</span></li>
<li>libs/flake/KoPathShape_p.h <span style="color: grey">(e1e2843)</span></li>
<li>libs/flake/KoSubpath.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>libs/flake/KoSubpath.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>libs/flake/commands/KoParameterToPathCommand.cpp <span style="color: grey">(177d35d)</span></li>
<li>libs/flake/commands/KoSubpathRemoveCommand.cpp <span style="color: grey">(79894f0)</span></li>
<li>plugins/pathshapes/ellipse/EllipseShape.cpp <span style="color: grey">(0576f5d)</span></li>
<li>plugins/pathshapes/enhancedpath/EnhancedPathCommand.cpp <span style="color: grey">(a58d67e)</span></li>
<li>plugins/pathshapes/enhancedpath/EnhancedPathShape.cpp <span style="color: grey">(46d76de)</span></li>
<li>plugins/pathshapes/rectangle/RectangleShape.cpp <span style="color: grey">(9caca45)</span></li>
<li>plugins/pathshapes/star/StarShape.cpp <span style="color: grey">(5fc8562)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101873/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>