<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/104993/">http://git.reviewboard.kde.org/r/104993/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On May 20th, 2012, 6:33 a.m., <b>Boudewijn Rempt</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/104993/diff/1/?file=65003#file65003line172" style="color: black; font-weight: bold; text-decoration: underline;">krita/ui/kra/kis_kra_saver.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="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; ">bool KisKraSaver::saveAssistants(KoStore* store, QString uri, bool external)</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">172</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">assist</span><span class="o">-></span><span class="n">id</span><span class="p">()</span> <span class="o">==</span> <span class="s">"ellipse"</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;">I'm not sure you need the if (assist->id() == "bla") here -- wouldn't it be more efficient use the id in the name, and have a map of id to count, instead of separate count variables?
Something like:
QMap<QString, int> assistantcounters;
assistantcounter[assist->id())++;
location += assistent->id() + assistantcounter[assist->id()) + ".assistant);</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 if condition will have to be the same, although the counters can be put in a map and the location created using them.</pre>
<br />
<p>- Shivaraman</p>
<br />
<p>On May 19th, 2012, 10:27 a.m., Shivaraman Aiyer 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.</div>
<div>By Shivaraman Aiyer.</div>
<p style="color: grey;"><i>Updated May 19, 2012, 10:27 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;">The Painting Assistants in Krita did not have the feature to be saved. This patch fixes that problem and lets the Assistants be saved and loaded for future use.
</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;">A basic testing of the assistants has been done after they are loaded.</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>krita/plugins/assistants/RulerAssistant/EllipseAssistant.h <span style="color: grey">(f6fd83b)</span></li>
<li>krita/plugins/assistants/RulerAssistant/EllipseAssistant.cc <span style="color: grey">(45851f1)</span></li>
<li>krita/plugins/assistants/RulerAssistant/PerspectiveAssistant.h <span style="color: grey">(c064d0b)</span></li>
<li>krita/plugins/assistants/RulerAssistant/PerspectiveAssistant.cc <span style="color: grey">(bd313a7)</span></li>
<li>krita/plugins/assistants/RulerAssistant/RulerAssistant.h <span style="color: grey">(2dd0307)</span></li>
<li>krita/plugins/assistants/RulerAssistant/RulerAssistant.cc <span style="color: grey">(4357a2b)</span></li>
<li>krita/plugins/assistants/RulerAssistant/SplineAssistant.h <span style="color: grey">(76fdfe4)</span></li>
<li>krita/plugins/assistants/RulerAssistant/SplineAssistant.cc <span style="color: grey">(7a1a2bb)</span></li>
<li>krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc <span style="color: grey">(f189346)</span></li>
<li>krita/ui/kis_doc2.h <span style="color: grey">(ef0413b)</span></li>
<li>krita/ui/kis_doc2.cc <span style="color: grey">(01752c1)</span></li>
<li>krita/ui/kis_painting_assistant.h <span style="color: grey">(34757b4)</span></li>
<li>krita/ui/kis_painting_assistant.cc <span style="color: grey">(a42beb9)</span></li>
<li>krita/ui/kis_painting_assistants_manager.cc <span style="color: grey">(b030aa2)</span></li>
<li>krita/ui/kis_view2.cpp <span style="color: grey">(e8e81af)</span></li>
<li>krita/ui/kra/kis_kra_loader.h <span style="color: grey">(328149d)</span></li>
<li>krita/ui/kra/kis_kra_loader.cpp <span style="color: grey">(d14a7d5)</span></li>
<li>krita/ui/kra/kis_kra_saver.h <span style="color: grey">(d114c2a)</span></li>
<li>krita/ui/kra/kis_kra_saver.cpp <span style="color: grey">(75b336e)</span></li>
<li>krita/ui/kra/kis_kra_tags.h <span style="color: grey">(da81174)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104993/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>