that one little change removes 90% of updates.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=804801
This commit is contained in:
Aaron J. Seigo 2008-05-06 22:42:01 +00:00
parent 307e1bdb59
commit 276b012adf

View File

@ -190,9 +190,16 @@ public:
Private(RunnerManager *parent)
: q(parent)
{
matchChangeTimer.setSingleShot(true);
connect(&matchChangeTimer, SIGNAL(timeout()), q, SLOT(scheduleMatchesChanged()));
connect(&context, SIGNAL(matchesChanged()), q, SLOT(matchesChanged()));
}
void scheduleMatchesChanged()
{
matchChangeTimer.start(100);
}
void matchesChanged()
{
emit q->matchesChanged(context.matches());
@ -268,6 +275,7 @@ public:
RunnerManager *q;
RunnerContext context;
QTimer matchChangeTimer;
AbstractRunner::List runners;
QList<ThreadWeaver::Job*> searchJobs;
QStringList prioritylist;