backport - prevents deadlock (deferredRun)
CCBUG: 181057 svn path=/branches/KDE/4.2/kdelibs/; revision=934418
This commit is contained in:
parent
d18c772f29
commit
186416f391
@ -287,8 +287,9 @@ public:
|
||||
FindMatchesJob *runJob = static_cast<FindMatchesJob*>(job);
|
||||
if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) {
|
||||
//kDebug() << "job actually done, running now **************";
|
||||
deferredRun.run(context);
|
||||
QueryMatch tmpRun = deferredRun;
|
||||
deferredRun = QueryMatch(0);
|
||||
tmpRun.run(context);
|
||||
}
|
||||
searchJobs.removeAll(runJob);
|
||||
delete runJob;
|
||||
@ -382,10 +383,12 @@ void RunnerManager::run(const QueryMatch &match)
|
||||
}
|
||||
}
|
||||
|
||||
match.run(d->context);
|
||||
|
||||
if (d->deferredRun.isValid()) {
|
||||
d->deferredRun = QueryMatch(0);
|
||||
|
||||
match.run(d->context);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,8 +510,9 @@ void RunnerManager::reset()
|
||||
|
||||
if (d->deferredRun.isEnabled()) {
|
||||
//kDebug() << "job actually done, running now **************";
|
||||
d->deferredRun.run(d->context);
|
||||
QueryMatch tmpRun = d->deferredRun;
|
||||
d->deferredRun = QueryMatch(0);
|
||||
tmpRun.run(d->context);
|
||||
}
|
||||
|
||||
d->context.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user