CompilationDbParser: Ensure the futures are synchronized

Don't leave possibly running futures on Creator shutdown.

Change-Id: I8b0f800518edde638376013f993f5846df4d1753
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2024-02-23 18:55:02 +01:00
parent 6dda17a2b3
commit 2bee865f80

View File

@@ -8,9 +8,12 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/treescanner.h>
#include <utils/async.h>
#include <utils/futuresynchronizer.h>
#include <utils/mimeutils.h>
#include <QCryptographicHash>
@@ -187,6 +190,7 @@ void CompilationDbParser::start()
"CompilationDatabase.Parse");
++m_runningParserJobs;
m_parserWatcher.setFuture(future);
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
}
void CompilationDbParser::stop()