LanguageClient: rename clientForSetting -> clientsForSetting

Change-Id: Idf4055769fba4c2551ac968c0232ddb3916acb6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-03-14 08:56:32 +01:00
parent 5924268568
commit 1a88f26d8b
4 changed files with 10 additions and 10 deletions

View File

@@ -442,7 +442,7 @@ bool PyLSSettings::applyFromSettingsWidget(QWidget *widget)
if (m_configuration != pylswidget->configuration()) {
m_configuration = pylswidget->configuration();
if (!changed) { // if only the settings configuration changed just send an update
const QList<Client *> clients = LanguageClientManager::clientForSetting(this);
const QList<Client *> clients = LanguageClientManager::clientsForSetting(this);
for (Client *client : clients)
client->updateConfiguration(configuration());
}
@@ -540,7 +540,7 @@ static Client *registerLanguageServer(const FilePath &python)
settings->m_name = PyLSConfigureAssistant::tr("Python Language Server (%1)")
.arg(pythonName(python));
LanguageClientManager::registerClientSettings(settings);
Client *client = LanguageClientManager::clientForSetting(settings).value(0);
Client *client = LanguageClientManager::clientsForSetting(settings).value(0);
PyLSConfigureAssistant::updateEditorInfoBars(python, client);
return client;
}
@@ -663,7 +663,7 @@ static void enablePythonLanguageServer(const FilePath &python,
if (const StdIOSettings *setting = PyLSConfigureAssistant::languageServerForPython(python)) {
LanguageClientManager::enableClientSettings(setting->m_id);
if (const StdIOSettings *setting = PyLSConfigureAssistant::languageServerForPython(python)) {
if (Client *client = LanguageClientManager::clientForSetting(setting).value(0)) {
if (Client *client = LanguageClientManager::clientsForSetting(setting).value(0)) {
LanguageClientManager::openDocumentWithClient(document, client);
PyLSConfigureAssistant::updateEditorInfoBars(python, client);
}
@@ -719,7 +719,7 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
return;
if (state.state == PythonLanguageServerState::AlreadyConfigured) {
if (const StdIOSettings *setting = languageServerForPython(python)) {
if (Client *client = LanguageClientManager::clientForSetting(setting).value(0))
if (Client *client = LanguageClientManager::clientsForSetting(setting).value(0))
LanguageClientManager::openDocumentWithClient(document, client);
}
return;