<div class="gmail_quote">On Wed, Apr 21, 2010 at 3:04 PM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Vishesh,<br>
<br>
very nice. One question:<br>
Why do you time the paused state instead of the indexing? Isn&#39;t it<br>
easier to understand if you time the indexing and when paused add the<br>
elapsed time to m_initialIndexTime?<br>
<br></blockquote><div><br>Actually. I&#39;m timing both the indexed and the paused time ( m_initialIndexTime &amp; m_pausedIndexTime ). When it transitions to a paused state, the paused timer is started and when it resume, the paused time is subtracted from the m_initialIndexTime. This would be so much easier if QTime provided pause() and resume() functions.<br>
<br>I could not start the m_initialIndexTime timer, and add the indexed time when it transitions to a paused state or finishes. Both approaches seem fairly intuitive to me. Your call. It&#39;s just a 2-min job changing it.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
And I just realized another bug in the service: the eventmonitor does<br>
not get informed when the indexing is resumed by another party (for<br>
example manually by the user). In that case the timing is wrong again.<br>
<br></blockquote><div><br>Yup. You&#39;re right. We&#39;ll have to connect the indexscheduler&#39;s indexingSuspended signal to a new slot, which could call the appropriate pauseIndexing() or resumeIndexing() function. This seems to be slightly counter intuitive as pauseIndexing() also tells the index scheduler to pause its indexing, but that shouldn&#39;t be a problem.<br>
<br>I&#39;ll take care of it.<br><br>- Vishesh Handa<br></div></div>