forked from qt-creator/qt-creator
LanguageClient: Reorder arguments in workspaceMatchers
Provide a default empty list for clients. It's going to be used for MatcherType::CurrentDocumentSymbols. Change-Id: Ib3ba2ec8fa08b9a55eb097ac3cce8bcd513eb5ae Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -207,15 +207,15 @@ ClangModelManagerSupport::ClangModelManagerSupport()
|
|||||||
cppModelManager()->setFunctionsFilter(std::make_unique<ClangFunctionsFilter>());
|
cppModelManager()->setFunctionsFilter(std::make_unique<ClangFunctionsFilter>());
|
||||||
// Setup matchers
|
// Setup matchers
|
||||||
LocatorMatcher::addMatcherCreator(MatcherType::AllSymbols, [] {
|
LocatorMatcher::addMatcherCreator(MatcherType::AllSymbols, [] {
|
||||||
return LanguageClient::workspaceMatchers(clientsForOpenProjects(), MatcherType::AllSymbols,
|
return LanguageClient::workspaceMatchers(MatcherType::AllSymbols, clientsForOpenProjects(),
|
||||||
10000);
|
10000);
|
||||||
});
|
});
|
||||||
LocatorMatcher::addMatcherCreator(MatcherType::Classes, [] {
|
LocatorMatcher::addMatcherCreator(MatcherType::Classes, [] {
|
||||||
return LanguageClient::workspaceMatchers(clientsForOpenProjects(), MatcherType::Classes,
|
return LanguageClient::workspaceMatchers(MatcherType::Classes, clientsForOpenProjects(),
|
||||||
10000);
|
10000);
|
||||||
});
|
});
|
||||||
LocatorMatcher::addMatcherCreator(MatcherType::Functions, [] {
|
LocatorMatcher::addMatcherCreator(MatcherType::Functions, [] {
|
||||||
return LanguageClient::workspaceMatchers(clientsForOpenProjects(), MatcherType::Functions,
|
return LanguageClient::workspaceMatchers(MatcherType::Functions, clientsForOpenProjects(),
|
||||||
10000);
|
10000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ static MatcherCreator creatorForType(MatcherType type)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
LocatorMatcherTasks workspaceMatchers(const QList<Client *> &clients, MatcherType type,
|
LocatorMatcherTasks workspaceMatchers(MatcherType type, const QList<Client *> &clients,
|
||||||
int maxResultCount)
|
int maxResultCount)
|
||||||
{
|
{
|
||||||
const MatcherCreator creator = creatorForType(type);
|
const MatcherCreator creator = creatorForType(type);
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ namespace LanguageClient {
|
|||||||
using DocSymbolModifier = std::function<void(Core::LocatorFilterEntry &,
|
using DocSymbolModifier = std::function<void(Core::LocatorFilterEntry &,
|
||||||
const LanguageServerProtocol::DocumentSymbol &, const Core::LocatorFilterEntry &)>;
|
const LanguageServerProtocol::DocumentSymbol &, const Core::LocatorFilterEntry &)>;
|
||||||
|
|
||||||
Core::LocatorMatcherTasks LANGUAGECLIENT_EXPORT workspaceMatchers(const QList<Client *> &clients,
|
Core::LocatorMatcherTasks LANGUAGECLIENT_EXPORT workspaceMatchers(Core::MatcherType type,
|
||||||
Core::MatcherType type,
|
const QList<Client *> &clients = {}, int maxResultCount = 0);
|
||||||
int maxResultCount = 0);
|
|
||||||
|
|
||||||
class LanguageClientManager;
|
class LanguageClientManager;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user