Diff Detail
Diff Detail
- Repository
- R165 Akonadi
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
SearchManager::updateSearch() can be called from arbitrary thread, but it's important that SearchManager::updateSearchImpl() is executed in SearchManager's thread, your change break this. We should probably add Q_ASSERT(QThread::currentThread() == thread()); at the beginning of updateSearchImpl() and properly documented the requirement (it's not very obvious from the comment in the header).
Also good point with the FIXME, probably need to do something like storing a QWaitConditions in the mUpdatingCollections vector so that others can wait and be notified when the search is finished.
src/server/search/searchmanager.cpp | ||
---|---|---|
273 | Replace Qt::QueuedConnection by Qt::BlockingQueuedConnection and you can still remove the QSemaphore. No idea why I did not use that in the first place... :-) |