diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index 40619bc8ed1..c1d8b59196b 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -209,7 +209,7 @@ ClangModelManagerSupport::ClangModelManagerSupport() using WorkspaceMatcherCreator = std::function; const auto matcherCreator = [](const WorkspaceMatcherCreator &creator) { const QList clients = clientsForOpenProjects(); - QList matchers; + LocatorMatcherTasks matchers; for (Client *client : clients) matchers << creator(client, 10000); return matchers; diff --git a/src/plugins/coreplugin/locator/ilocatorfilter.cpp b/src/plugins/coreplugin/locator/ilocatorfilter.cpp index fc8b7126788..9628fc49fde 100644 --- a/src/plugins/coreplugin/locator/ilocatorfilter.cpp +++ b/src/plugins/coreplugin/locator/ilocatorfilter.cpp @@ -287,7 +287,7 @@ namespace Core { class LocatorMatcherPrivate { public: - QList m_tasks; + LocatorMatcherTasks m_tasks; LocatorMatcherTask::Storage m_storage; int m_parallelLimit = 0; std::unique_ptr m_taskTree; @@ -298,7 +298,7 @@ LocatorMatcher::LocatorMatcher() LocatorMatcher::~LocatorMatcher() = default; -void LocatorMatcher::setTasks(const QList &tasks) +void LocatorMatcher::setTasks(const LocatorMatcherTasks &tasks) { d->m_tasks = tasks; } @@ -411,7 +411,7 @@ LocatorFilterEntries LocatorMatcher::outputData() const return d->m_storage.output; } -LocatorFilterEntries LocatorMatcher::runBlocking(const QList &tasks, +LocatorFilterEntries LocatorMatcher::runBlocking(const LocatorMatcherTasks &tasks, const QString &input, int parallelLimit) { LocatorMatcher tree; @@ -435,10 +435,10 @@ void LocatorMatcher::addMatcherCreator(MatcherType type, const LocatorMatcherTas s_matcherCreators[type].append(creator); } -QList LocatorMatcher::matchers(MatcherType type) +LocatorMatcherTasks LocatorMatcher::matchers(MatcherType type) { const QList creators = s_matcherCreators.value(type); - QList result; + LocatorMatcherTasks result; for (const LocatorMatcherTaskCreator &creator : creators) result << creator(); return result; diff --git a/src/plugins/coreplugin/locator/ilocatorfilter.h b/src/plugins/coreplugin/locator/ilocatorfilter.h index e8428e5eb36..e89bdc0885c 100644 --- a/src/plugins/coreplugin/locator/ilocatorfilter.h +++ b/src/plugins/coreplugin/locator/ilocatorfilter.h @@ -132,7 +132,8 @@ public: Utils::Tasking::TreeStorage storage; }; -using LocatorMatcherTaskCreator = std::function()>; +using LocatorMatcherTasks = QList; +using LocatorMatcherTaskCreator = std::function; class LocatorMatcherPrivate; enum class MatcherType { @@ -149,7 +150,7 @@ class CORE_EXPORT LocatorMatcher final : public QObject public: LocatorMatcher(); ~LocatorMatcher(); - void setTasks(const QList &tasks); + void setTasks(const LocatorMatcherTasks &tasks); void setInputData(const QString &inputData); void setParallelLimit(int limit); // by default 0 = parallel void start(); @@ -160,11 +161,11 @@ public: LocatorFilterEntries outputData() const; // Note: Starts internal event loop. - static LocatorFilterEntries runBlocking(const QList &tasks, + static LocatorFilterEntries runBlocking(const LocatorMatcherTasks &tasks, const QString &input, int parallelLimit = 0); static void addMatcherCreator(MatcherType type, const LocatorMatcherTaskCreator &creator); - static QList matchers(MatcherType type); + static LocatorMatcherTasks matchers(MatcherType type); signals: void serialOutputDataReady(const LocatorFilterEntries &serialOutputData);