<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/112584/">http://git.reviewboard.kde.org/r/112584/</a>
     </td>
    </tr>
   </table>
   <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/112584/diff/4/?file=189539#file189539line1477" style="color: black; font-weight: bold; text-decoration: underline;">sheets/ui/CellToolBase.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 4)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">1477</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="tb">   </span><span class="n">QString</span> <span class="n">value</span><span class="o">=</span><span class="n">conv</span><span class="o">-></span><span class="n">toString</span><span class="p">(</span> <span class="n">conv2</span><span class="o">-></span><span class="n">asString</span><span class="p">(</span><span class="n">val</span><span class="p">)</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;">Hi Jigar,

one thing must have slipped your eyes, the compiler sees three issues in the new code, see http://build.kde.org/job/calligra_master/1681/warnings16Result/new/

Always pay attention to compiler warnings and make sure there are none :)

While the first just warns about an unneeded var (though still worth to fix that, for a clean build and no unneeded code), the second two warnings seem indeed hint to a crash just waiting, as the conv and conv2 are nowhere set here in CellToolBase::populateWordCollection() and thus things will crash in this line
        QString value=conv->toString( conv2->asString(val) );
if it ever will be executed.

Please better fix that as soon as you find time :)

Cheers
Friedrich</pre>
</div>
<br />



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


<br />
<p>On October 29th, 2013, 8:56 p.m. UTC, Jigar Raisinghani 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 and Inge Wallin.</div>
<div>By Jigar Raisinghani.</div>


<p style="color: grey;"><i>Updated Oct. 29, 2013, 8:56 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
calligra
</div>


<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;">This feature enables you to save time by just clicking/selecting redundant entries to fill a cell in the sheet. 

How to use:
1) Open a file containing some data/ Open a blank file and enter some data
2) Try entering data in the columns which already contain some data which has atleast first 3 characters similar to some other entry in the same column

You can see that a popup appears near your cell which gives you suggestions based on the text you have entered in the current cell. You can chose any suggestion by clicking on it or using the arrow keys to navigate through options and using Tab/Enter to fill in the suggestion in the cell.

Optimization:
1) Currently, Autocomplete has been optimized to a large extent by Hash Tables

Further Optimization possible(but not yet done):
1) Navigate only through cells which are already populated using nextInRow() and nextInColumn() to populate the HashTable.
2) Use thread to populate Hash Table when sheet is loaded. This process if run in background, can optimize the feature further.

Further Improvements possible:
1) Currently, the choices filled in the suggestion list are based on Most Recently Used 3 entries. Autocomplete can be made smarter by populating the list with 3 Most Redundant entries but this would increase the complexity and optimization would again be needed.




</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 feature works successfully for fair amount of data. Testing yet to be done for Huge 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>sheets/ui/CellEditor.h <span style="color: grey">(92bdad6)</span></li>

 <li>sheets/ui/CellEditor.cpp <span style="color: grey">(d539c06)</span></li>

 <li>sheets/ui/CellToolBase.h <span style="color: grey">(0c404ce)</span></li>

 <li>sheets/ui/CellToolBase.cpp <span style="color: grey">(512fdbb)</span></li>

 <li>sheets/ui/CellToolBase_p.h <span style="color: grey">(9cdadf2)</span></li>

</ul>

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







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








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