<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/101182/">http://git.reviewboard.kde.org/r/101182/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">generally seems correct.
to watch out the coding style.
it's quite a big patch, but given enough testing (and assuming this will be multiple commits) i think it could go in</pre>
<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/101182/diff/1/?file=15159#file15159line243" style="color: black; font-weight: bold; text-decoration: underline;">applets/rememberthemilk/taskmodel.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; ">ListItem* TaskModel::listFromId(qulonglong id) {</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">243</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">listUpdate</span><span class="p">(</span><span class="n">listId</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;">this looks a bit risky..</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/101182/diff/1/?file=15159#file15159line250" style="color: black; font-weight: bold; text-decoration: underline;">applets/rememberthemilk/taskmodel.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; ">ListItem* TaskModel::listFromId(qulonglong id) {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">246</font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">else</span> <span class="n">engine</span><span class="o">-></span><span class="n">connectSource</span><span class="p">(</span><span class="s">"List:"</span> <span class="o">+</span> <span class="n">QString</span><span class="o">::</span><span class="n">number</span><span class="p">(</span><span class="n">listId</span><span class="p">),</span> <span class="k">this</span><span class="p">);</span></pre></td>
<th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">} else {
engine->connectSource("List:" + QString::number(listId), this);
}</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/101182/diff/1/?file=15165#file15165line196" style="color: black; font-weight: bold; text-decoration: underline;">libs/rtm/session_p.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class RTM::SessionPrivate {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">145</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">foreach</span><span class="p">(</span><span class="n">RTM</span><span class="o">::</span><span class="n">Task</span><span class="o">*</span> <span class="n">task</span><span class="p">,</span> <span class="n">reader</span><span class="p">.</span><span class="n">readTasks</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">196</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="n">list</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;">if (list) {</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/101182/diff/1/?file=15165#file15165line260" style="color: black; font-weight: bold; text-decoration: underline;">libs/rtm/session_p.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class RTM::SessionPrivate {</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">257</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="ew"> </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;">whitespaces should go</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/101182/diff/1/?file=15168#file15168line195" style="color: black; font-weight: bold; text-decoration: underline;">libs/rtm/xmlreaders.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 RTM::TasksReader::readList() {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">195</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">changedLists</span><span class="p">.</span><span class="n"><span class="hl">append</span></span><span class="p">(</span><span class="n">list</span><span class="p">)<span class="hl">;</span></span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">177</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"> </span><span class="k"><span class="hl">if</span></span><span class="hl"> </span><span class="p"><span class="hl">(</span></span><span class="o"><span class="hl">!</span></span><span class="n"><span class="hl">session</span></span><span class="o"><span class="hl">-></span></span><span class="n"><span class="hl">d</span></span><span class="o"><span class="hl">-></span></span><span class="n">changedLists</span><span class="p">.</span><span class="n"><span class="hl">contains</span></span><span class="p">(</span><span class="n">list</span><span class="p">)<span class="hl">)</span></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;">if () {</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/101182/diff/1/?file=15168#file15168line301" style="color: black; font-weight: bold; text-decoration: underline;">libs/rtm/xmlreaders.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 RTM::TasksReader::readTask(TempProps *props) {</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">300</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">changedTasks</span><span class="p">.</span><span class="n"><span class="hl">append</span></span><span class="p">(</span><span class="n">task</span><span class="p">)<span class="hl">;</span></span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">281</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="hl"> </span><span class="k"><span class="hl">if</span></span><span class="hl"> </span><span class="p"><span class="hl">(</span></span><span class="o"><span class="hl">!</span></span><span class="n"><span class="hl">session</span></span><span class="o"><span class="hl">-></span></span><span class="n"><span class="hl">d</span></span><span class="o"><span class="hl">-></span></span><span class="n">changedTasks</span><span class="p">.</span><span class="n"><span class="hl">contains</span></span><span class="p">(</span><span class="n">task</span><span class="p">)<span class="hl">)</span></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;">brackets for single line if there too</pre>
</div>
<br />
<p>- Marco</p>
<br />
<p>On May 1st, 2011, 5:38 p.m., Alexey Chernov 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 Plasma and Aaron J. Seigo.</div>
<div>By Alexey Chernov.</div>
<p style="color: grey;"><i>Updated May 1, 2011, 5:38 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;">Smart lists in Remember The Milk are essentially special lists which contain tasks filtered by certain criteria. Most common smart list is 'All tasks'.
The bug is that on adding/deleting/modifying any task smart lists aren't updated in RTM plasmoid. One just have to wait for the next timeout update. And it turned out that the bug concerns the design of RTM library quite deeply. So the fix contains some certain changes to several places of the RTM lib (fixes to applet and dataengine are quite cosmetic). The main idea is to make all the smart lists be updated on every change to tasks.
Few words about changes:
1. I added 'read-only' attribute to Request class (request.h) so that split read-only requests and read-write requests which should trigger smart lists update.
2. I made few changes to xmlreaders and Session class to keep the initial request and smart lists update inside one user action (i.e. so that 'loading' is shown during all these operations).</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;">I've tested the code hugely with all the mentioned operations (add task, modify task, delete task) and smart lists are updated correctly with this patch. Updating smart lists on every modifying request makes it longer mainly because 1s interval between requests and slight duplication of requests here and there but I'm currently testing another patch which removes most of duplications to speed up the overall process.</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>libs/rtm/xmlreaders.cpp <span style="color: grey">(507ac0d1c7f85e7e53c57ef022a78e78c619dd06)</span></li>
<li>libs/rtm/xmlreaders.h <span style="color: grey">(882f0500c7178bf5982a65b01b3cc2268ba1fe8b)</span></li>
<li>libs/rtm/task_p.h <span style="color: grey">(00c794e75457f4de3680f0689dc4b741f15db4ce)</span></li>
<li>libs/rtm/session.cpp <span style="color: grey">(dfd5db27c7a48a24921fd1ddbd4c4acf82fe9408)</span></li>
<li>libs/rtm/session_p.h <span style="color: grey">(34c2063a5a2015bed0e2bd8b9681df5c7b9e2802)</span></li>
<li>libs/rtm/session.h <span style="color: grey">(aad145c44c70fb28fe1496b93d991667e918f630)</span></li>
<li>libs/rtm/request.cpp <span style="color: grey">(a2983300b989acd278e855623457a743948e1cdd)</span></li>
<li>applets/rememberthemilk/taskmodel.cpp <span style="color: grey">(8e2ab387996ec81c6c6471c8e845ad3a881a4ce8)</span></li>
<li>dataengines/rememberthemilk/rtmengine.cpp <span style="color: grey">(7e231efe7b0a977648c40e8438fd25a0154f0a50)</span></li>
<li>libs/rtm/request.h <span style="color: grey">(58cb7daec491b652c5de2a1e18214df5e7baa5e9)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101182/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>