Prevents a deadlock when dealing with a deferredRun
BUG: 181057 svn path=/trunk/KDE/kdelibs/; revision=934417
This commit is contained in:
parent
3f50ffd7ce
commit
218093c467
@ -163,8 +163,9 @@ public:
|
||||
FindMatchesJob *runJob = static_cast<FindMatchesJob*>(job);
|
||||
if (deferredRun.isEnabled() && runJob->runner() == deferredRun.runner()) {
|
||||
//kDebug() << "job actually done, running now **************";
|
||||
deferredRun.run(context);
|
||||
deferredRun = QueryMatch(0);
|
||||
QueryMatch tmpRun = deferredRun;
|
||||
deferredRun = QueryMatch(0);
|
||||
tmpRun.run(context);
|
||||
}
|
||||
searchJobs.removeAll(runJob);
|
||||
delete runJob;
|
||||
@ -270,10 +271,12 @@ void RunnerManager::run(const QueryMatch &match)
|
||||
}
|
||||
}
|
||||
|
||||
match.run(d->context);
|
||||
|
||||
if (d->deferredRun.isValid()) {
|
||||
d->deferredRun = QueryMatch(0);
|
||||
|
||||
match.run(d->context);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -400,8 +403,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