forked from qt-creator/qt-creator
Don't call method with BlockingQueuedConnection from refresh()
This may cause a deadlock on shutdown, when main thread blocking waits for a thread to finish, and BlockingQueuedConnection requires a main thread to run event loop, otherwise it blocks. Looks like it should be safe to replace it with QueuedConnection, as the point in time when OpenDocumentsFilter::refresh() is being called is arbitrary, so no need to ensure that refreshInternally() in the main thread was already called when leaving OpenDocumentsFilter::refresh(). Change-Id: I39a1b9b1c82f1e9ed7e6ad5c183c5f9f41a1a061 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -113,8 +113,7 @@ QList<OpenDocumentsFilter::Entry> OpenDocumentsFilter::editors() const
|
||||
void OpenDocumentsFilter::refresh(QFutureInterface<void> &future)
|
||||
{
|
||||
Q_UNUSED(future)
|
||||
QMetaObject::invokeMethod(this, &OpenDocumentsFilter::refreshInternally,
|
||||
Qt::BlockingQueuedConnection);
|
||||
QMetaObject::invokeMethod(this, &OpenDocumentsFilter::refreshInternally, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void OpenDocumentsFilter::accept(LocatorFilterEntry selection,
|
||||
|
||||
Reference in New Issue
Block a user