<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://svn.reviewboard.kde.org/r/6589/">http://svn.reviewboard.kde.org/r/6589/</a>
     </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/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 kmymoney.</div>
<div>By Cristian Onet.</div>


<p style="color: grey;"><i>Updated March 6, 2011, 7:51 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Since AccountsModel::load() should only be called once when the model is empty don&#39;t try to search for the item that represents an account anymore because it&#39;s sure that it will not be found.
Fixed some issues reported bellow without the ones requiring more debug statements. I really am against adding extra null pointer tests on function assertions. I mean it is an assertion that all existing accounts should be represented by an item then it should not be necessary to test for null pointers some places where Thomas requested that. If that happens then there is a really big bug there anyway and I prefer it to crash then to ignore the error or pollute the code with null pointer checks followed by qDebug statements.</pre>
  </td>
 </tr>
</table>


<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;">Instead of synchronizing the whole account tree on each data changed take advantage of the new, more granular, signals and perform the appropriate modifications in the model&#39;s data after it has been loaded once.

Also create a separate instance for the institutions model. This change has the following rationale. Mixing the two hierarchies in the same model (by account type and institution) would make it difficult to implement changes since depending on the changes it would imply structural modifications in only one instance of the same account. So for example changing the institution means a structural change in the institution hierarchy but no change in the accounts by type hierarchy. Separating the two hierarchies means that one account can be found only once in the model and it also simplifies the implementation of the modifications slots.</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;">Simple testing using a test file: adding/removing/modifying accounts and modifying banances.</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="https://bugs.kde.org/show_bug.cgi?id=230277">230277</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/extragear/office/kmymoney/kmymoney/models/accountsmodel.h <span style="color: grey">(1223871)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/models/accountsmodel.cpp <span style="color: grey">(1223871)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/models/models.h <span style="color: grey">(1223871)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/models/models.cpp <span style="color: grey">(1223871)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/views/kinstitutionsview.cpp <span style="color: grey">(1223871)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/views/kmymoneyview.cpp <span style="color: grey">(1223871)</span></li>

</ul>

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




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




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