Review Request: Progress Widget in krunner

Jacopo De Simoi wilderkde at gmail.com
Tue Jun 2 16:59:42 CEST 2009



> On 2009-06-02 03:43:16, Jacopo De Simoi wrote:
> > The idea is quite nice, however I see a problem here:
> > 
> >    connect(runnerManager, SIGNAL(matchesChanged(const QList<Plasma::QueryMatch> &)), SLOT(stopProgressWidget()));
> > 
> > in fact matchesChanged might be called several times during a query, especially if the user has enabled ``slow'' runners (e.g. nepomuk). 
> > This implies that the progresswidget would stop before the query has actually finished, which is not accurate.
> > I haven't thought about it too much, but I believe that if you want to provide such functionality you have to modify runnerManager to emit a signal when all runners have finished, which may not be completely trivial.
> 
> jgoday wrote:
>     Thanks for the reply.
>     
>     Correct me if i'm wrong, but runnerManager->jobDone only calls matchesChanged signal 
>     when no job is left.
>     
>     That's the code from runnerManager, line 194
>     
>     if (searchJobs.isEmpty() && context.matches().isEmpty()) {
>         // we finished our run, and there are no valid matches, and so no
>         // signal will have been sent out. so we need to emit the signal
>         // ourselves here
>         emit q->matchesChanged(context.matches());
>     }
>     
>     Am i misunderstood ?

In fact matchesChanged is called mostly in runnercontext:319 (and following)

bool RunnerContext::addMatches(const QString &term, const QList<QueryMatch> &matches)
{
....
emit d->q->matchesChanged();

    return true;
}

the call in jobDone is just for cleanup purposes.


- Jacopo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/789/#review1255
-----------------------------------------------------------


On 2009-06-02 03:06:37, jgoday wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/789/
> -----------------------------------------------------------
> 
> (Updated 2009-06-02 03:06:37)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Display a progress widget in krunner while performing the krunnermanager->query
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/krunner/interfaces/default/interface.h 976186 
>   /trunk/KDE/kdebase/workspace/krunner/interfaces/default/interface.cpp 976186 
> 
> Diff: http://reviewboard.kde.org/r/789/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> krunner
>   http://reviewboard.kde.org/r/789/s/127/
> 
> 
> Thanks,
> 
> jgoday
> 
>



More information about the Plasma-devel mailing list