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




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 Denis Steckelmacher.</div>










<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevplatform
</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;">BackgroundParser::queuedCount() returns the number of documents that are queued in BackgroundParser. The problem is that this method can return zero when there is no queued document in BackgroundParser, but some of them are still queued or running in ThreadWeaver::Weaver.

The method added by this patch returns true only when the document queue is completely empty and ThreadWeaver::Weaver is idle (no job queued, no job running). When this method returns true, the user can be assured that nothing can happen in a background thread.</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;">This new method is used by the QML/JS plugin to wait for all the parsing jobs to be finished before trying to use and free DUContexts. The unit tests of the QMLJS plugin all pass with this patch applied. The testsuite of kdevplatform has no regression, but seven tests fail with or without this patch:

The following tests FAILED:
         25 - shell-documentcontrollertest (Failed)
         26 - shell-uicontrollertest (Failed)
         27 - shell-buddytest (Failed)
         28 - shell-documentoperationtest (Failed)
         38 - modelsTest (Failed)
         39 - reloadtest (Failed)
         40 - standardoutputview-test (Failed)

They crash in the initialization code. I think that it is a problem in my setup or something like that, because they all pass on build.kde.org.</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>language/backgroundparser/backgroundparser.h <span style="color: grey">(d96d67b)</span></li>

 <li>language/backgroundparser/backgroundparser.cpp <span style="color: grey">(dec1be7)</span></li>

</ul>

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







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




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