From ec8411f86a3e0d918a8cdd47a5d96cff1fc5e9df Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 10 Feb 2021 14:54:05 +0100 Subject: [PATCH] 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 --- src/plugins/coreplugin/locator/opendocumentsfilter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp index 2a10fcce006..2a636b51c42 100644 --- a/src/plugins/coreplugin/locator/opendocumentsfilter.cpp +++ b/src/plugins/coreplugin/locator/opendocumentsfilter.cpp @@ -113,8 +113,7 @@ QList OpenDocumentsFilter::editors() const void OpenDocumentsFilter::refresh(QFutureInterface &future) { Q_UNUSED(future) - QMetaObject::invokeMethod(this, &OpenDocumentsFilter::refreshInternally, - Qt::BlockingQueuedConnection); + QMetaObject::invokeMethod(this, &OpenDocumentsFilter::refreshInternally, Qt::QueuedConnection); } void OpenDocumentsFilter::accept(LocatorFilterEntry selection,