diff options
author | Jarek Kobus <[email protected]> | 2023-12-21 00:48:52 +0100 |
---|---|---|
committer | Jarek Kobus <[email protected]> | 2024-10-07 10:21:13 +0000 |
commit | 52fce7a46931f57d19358a7ec6958db897f1d60a (patch) | |
tree | c9b25fca00915bf1220b3fed452aab2dc1d3e8a8 /src/plugins/qmljstools | |
parent | 9eadb18df060e581350f0e523f36d0554ef6f3c2 (diff) |
ILocatorFilter: Refactor ILocatorFilter::matchers() function
Introduce LocatorStorage::storage() method, to be used
from the bodies of locator task handlers.
Replace the return value of ILocatorFilter::matchers()
with a list of ExecutableItems.
Change-Id: I467bb9f217465af74a017095d4fffdf74c4ba7bd
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/qmljstools')
-rw-r--r-- | src/plugins/qmljstools/qmljsfunctionfilter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/qmljstools/qmljsfunctionfilter.cpp b/src/plugins/qmljstools/qmljsfunctionfilter.cpp index c6f8dfa4fd0..21915e7be92 100644 --- a/src/plugins/qmljstools/qmljsfunctionfilter.cpp +++ b/src/plugins/qmljstools/qmljsfunctionfilter.cpp @@ -12,6 +12,7 @@ using namespace Core; using namespace QmlJSTools::Internal; +using namespace Tasking; using namespace Utils; Q_DECLARE_METATYPE(LocatorData::Entry) @@ -74,13 +75,9 @@ static void matches(QPromise<void> &promise, const LocatorStorage &storage, LocatorMatcherTasks QmlJSFunctionsFilter::matchers() { - using namespace Tasking; - - Storage<LocatorStorage> storage; - - const auto onSetup = [storage, entries = m_data->entries()](Async<void> &async) { - async.setConcurrentCallData(matches, *storage, entries); + const auto onSetup = [entries = m_data->entries()](Async<void> &async) { + async.setConcurrentCallData(matches, *LocatorStorage::storage(), entries); }; - return {{AsyncTask<void>(onSetup), storage}}; + return {AsyncTask<void>(onSetup)}; } |