forked from qt-creator/qt-creator
Locator: Do not block main event loop
There are multiple locator filters (SpotlightLocatorFilter,
JavaScriptFilter, HelpIndexFilter, the LanguageClient filters) that
depend on the main event loop, and might lock up if that does not run
anymore.
So we cannot use waitForFinished. Cancel a running locator search, and
tell the plugin manager that we need to wait for asynchronous events to
finish before shutting down.
Amends cb5977fbad
Change-Id: Id0b3dc75bc22f21b34be39c3bdbec915b60bdee6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -443,7 +443,8 @@ QString CorePlugin::msgCrashpadInformation()
|
||||
ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown()
|
||||
{
|
||||
Find::aboutToShutdown();
|
||||
m_locator->aboutToShutdown();
|
||||
ExtensionSystem::IPlugin::ShutdownFlag shutdownFlag = m_locator->aboutToShutdown(
|
||||
[this] { emit asynchronousShutdownFinished(); });
|
||||
m_mainWindow->aboutToShutdown();
|
||||
return SynchronousShutdown;
|
||||
return shutdownFlag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user