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








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 14th, 2010, 11:36 a.m., <b>Thomas Baumgart</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://svn.reviewboard.kde.org/r/5463/diff/1/?file=38583#file38583line56" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.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; ">InvestProcessing::InvestProcessing()</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">55</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">InvestProcessing</span><span class="o">::</span><span class="n">InvestProcessing</span><span class="p">()</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">56</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">InvestProcessing</span><span class="o">::</span><span class="n">InvestProcessing</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;">Missing call of base class ctor here.</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;">Sorry, but I&#39;m not sure what you mean here.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 14th, 2010, 11:36 a.m., <b>Thomas Baumgart</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://svn.reviewboard.kde.org/r/5463/diff/1/?file=38583#file38583line215" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.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; ">void InvestProcessing::disableInputs()</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void InvestProcessing::dateColumnSelected(int col)</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">212</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">InvestProcessing</span><span class="o">::</span><span class="n">disableInputs</span><span class="p">()</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">215</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">InvestProcessing</span><span class="o">::</span><span class="n">disableInputs</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 only modifies 10 widgets whereas enableInputs modifies 17.

Better use a single method and pass it true/false as parameter, eg.

enableInputs(bool enable) {...}

disableInputs() { enableInputs(false); }

enableInputs() { enableInputs(true); }

This avoids the error prone job of maintaining two lists.</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;">Yes, I can see that would be better, although there were other minor differences between the two.
However, I took a different tack and have removed disableInputs() altogether.  It wasn&#39;t really achieving anything.  I have the columns all disabled in the UIs, together with other fields which depend on the data read in.  So, they only get enabled once a file is read in, so that the user doesn&#39;t waste effort selecting before he&#39;s seen the data.  There&#39;s not really any need to disable them after that, the hope being that the user will have twigged!  In fact, I&#39;ve gone slightly further, having found from experience that if a file is imported and a wrong date format has been detected, the user will just either want to select the correct format, or correct the start or end lines because he has included non-financial data, ie a header or trailer line.  So there was no point in disabling the start line selection and forcing him to reload the file.</pre>
<br />




<p>- Allan</p>


<br />
<p>On September 27th, 2010, 4:53 p.m., Allan Anderson wrote:</p>






<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 Allan Anderson.</div>


<p style="color: grey;"><i>Updated 2010-09-27 16:53:42</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 initial intention was to add an additional unit test, which involved removing data line parsing from the displayLine() routine into a small separate class to enable access from the unit test routine.  This led to benefits in two other areas.  

One csv test file I have had a comma as thousand separator, which was conflicting with the comma field separator.  Initially, I looked at this from the point of view of field separators and concocted a separator which successfully dealt with the issue.  However, I realised that the same odd separator might not work in another similar situation.  So, I&#39;ve improved the detection and handling of this issue.

This then led to changes in csvProcessing() and investProcessing(), removing redundant code and improving efficiency slightly.

Two UIs have had a now unneeded field separator combobox item removed.  Some minor purely cosmetic changes also have been made.

</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;">The new parsedatatest() unit test runs successfully.  Krazy and astyle have been run. Functional testing done with various csv format files.</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>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/CMakeLists.txt <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlgdecl.ui <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.h <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.cpp <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvutil.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvutil.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlgdecl.ui <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.h <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investprocessing.cpp <span style="color: grey">(1180212)</span></li>

 <li>/trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlg.cpp <span style="color: grey">(1180212)</span></li>

</ul>

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




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








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