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




<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 KDevelop.</div>
<div>By Kevin Funk.</div>


<p style="color: grey;"><i>Updated Feb. 12, 2013, 2:24 a.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;">ReviewBoard is clearly weird in some situations. Now it changed the title again... Fixing.</pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Summary (updated)</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;">Thread for OutputModel contents filtering.</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;">Quit thread after some time

Since the OutputModel instance may live for a long time, try not to keep
a thread running that may never be used again.

Further improve the background thread

Cache the lines a certain amount of time before trying to process them.
This will guarantee that the batch is more likely in a filled state,
hence reducing the number of calls to beginInsertRow() at the end.

Also add some debug output for time measurements.

Fixup/cleanup threaded output line classification.

- use a QVector instead of a QList for efficiency,
  reserve/squeeze batch sized buffer
- use a foreach loop instead of a broken for loop
- don't use shared pointers for objects that are not
  shared. here we can simply rely on QObject parent-child
  relation ship
- don't use a setupParser init function, use the ctor of the
  OutputModelPrivate for that
- use Q_PRIVATE_SLOT to not taint our public interface
- use invokeMethod to push data to worker instead of signal
  in public interface
- properly close and wait for the thread when we destroy the
  OutputModelPrivate
- cleanup #include list of outputmodel.h

Mark FitleredItem as movable and make it possible to sore it in QVector


Move parsing of lines to a background thread

This moves the parsing of the added lines to a background thread to avoid
blocking the UI while the QRegEx'es are being matched. The current
implementation has a major flaw though, deleting an OutputModel causes
a crash because the thread cannot be stopped properly (at least thats what
I think is causing the crash). This might be avoidable by dropping the
manual usage of QThread and instead do this through QtConcurrent, but then
we again need manual batching with a invokeMethod to ensure that not all
lines are added at once to the view.

Removes 'removeLastLines' since the only user was the ninja-plugin and that
one should handle its special needs in its own code instead of requiring
API changes that nobody else needs.

Removes 'flushLineBuffer' since the idea of that function goes completely
against the idea of doing batches in the first place so it shouldn't exist.
If code needs to know when all items are available in the model it'll have
to connect to the model signals and verify wether the number of lines in
the model matches the expected final amount. This function is used in the
ctest-related code in kdevelop, so will need a change there too.</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>outputview/outputmodel.h <span style="color: grey">(55920beab6ee16643ef449d816d210ba343046e6)</span></li>

 <li>outputview/outputmodel.cpp <span style="color: grey">(c482222c2448fe75d97911d10aaa7b89fa15bfbf)</span></li>

 <li>outputview/outputexecutejob.cpp <span style="color: grey">(56167e6267d5d60caf5378bc1ea994a8a731e789)</span></li>

 <li>outputview/filtereditem.h <span style="color: grey">(8eab5e9d6dbefefc203884291f6894ca2a1411a9)</span></li>

</ul>

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







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




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