<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/111751/">http://git.reviewboard.kde.org/r/111751/</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;">Fix would work, but... I am not happy with it, sorry. I hope the reasoning makes sense to you.
If so, then please consider updating the patch with something as proposed.
If not, please tell.</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/111751/diff/1/?file=174019#file174019line724" style="color: black; font-weight: bold; text-decoration: underline;">plan/libs/models/kpttaskstatusmodel.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 TaskStatusItemModel::slotNodeChanged( Node *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">724</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">refresh</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 calling "refresh()" at the end anyway, then all the logic with the row before and emitting dataChanged is unneeded, from what I understand of the rest of the code.

Ideally the "TaskStatusItemModel::slotNodeChanged(...)" method would have some additional logic which checks if the task is still in the same group. Possibly there could be a private enum listing all the groups ("TaskStatus {TaskStarted, TaskRunning, TaskUpcoming, TaskNotStarted }") and a separate, private method which estimates the group for a given task ("TaskStatus TaskStatusItemModel::statusOfNode( Node *node )"). The latter would have the code to estimate the group just taken from "TaskStatusItemModel::refresh()" which would after that then use "TaskStatusItemModel::statusOfNode(...)" instead.
With that "TaskStatusItemModel::slotNodeChanged( Node *node )" could use "TaskStatusItemModel::statusOfNode(...)" to see if the new status matches the old one known, and in the case it does not go and call "refresh()", but in all other cases just emit dataChanged() as before.
To get the proper group via the enum it needs to be ensured that the order of the groups in "QList <KPlato::NodeMap* > m_top" matches the value of the status in the enum, so "m_top[status]" will get it.

Got what I mean?</pre>
</div>
<br />



<p>- Friedrich W. H.</p>


<br />
<p>On July 27th, 2013, 8:58 p.m. UTC, Alvaro Soliverez wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Calligra.</div>
<div>By Alvaro Soliverez.</div>


<p style="color: grey;"><i>Updated July 27, 2013, 8:58 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;">When updating progress of a task, the Task Status view does not refresh accordingly. If the task was already in the view (it shows tasks only within a timeframe or tasks in progress), it will not change groups if the task changes status. If the task was not in the view, and for example, it is set to started, it will not show up in the view.

call refresh() after slotNodeChanged()</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;">Tested with a live file, now it refreshes correctly in both cases</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=322897">322897</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>plan/libs/models/kpttaskstatusmodel.cpp <span style="color: grey">(6257ea3)</span></li>

</ul>

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







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








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