forked from qt-creator/qt-creator
AsyncTask: Centralize setting global future synchronizer
Move the global FutureSynchronizer to Utils and use it by default for AsyncTask (if that is in the main thread). This way setting a synchronizer is less prone to be forgotten. Individual uses can still override this. Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
#include "qmljslocatordata.h"
|
||||
#include "qmljstoolstr.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/async.h>
|
||||
|
||||
@@ -81,7 +79,6 @@ LocatorMatcherTasks QmlJSFunctionsFilter::matchers()
|
||||
Storage<LocatorStorage> storage;
|
||||
|
||||
const auto onSetup = [storage, entries = m_data->entries()](Async<void> &async) {
|
||||
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
||||
async.setConcurrentCallData(matches, *storage, entries);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user