diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index 750ab333826..b13aef42077 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -301,10 +301,13 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python, auto install = new PipInstallTask(python); connect(install, &PipInstallTask::finished, this, [=](const bool success) { + const QList additionalDocuments = m_infoBarEntries.take(python); if (success) { - if (document) { - if (PyLSClient *client = clientForPython(python)) + if (PyLSClient *client = clientForPython(python)) { + if (document) LanguageClientManager::openDocumentWithClient(document, client); + for (TextEditor::TextDocument *additionalDocument : additionalDocuments) + LanguageClientManager::openDocumentWithClient(additionalDocument, client); } } install->deleteLater(); @@ -375,15 +378,6 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python, } } -void PyLSConfigureAssistant::updateEditorInfoBars(const FilePath &python, Client *client) -{ - for (TextEditor::TextDocument *document : instance()->m_infoBarEntries.take(python)) { - instance()->resetEditorInfoBar(document); - if (client) - LanguageClientManager::openDocumentWithClient(document, client); - } -} - void PyLSConfigureAssistant::resetEditorInfoBar(TextEditor::TextDocument *document) { for (QList &documents : m_infoBarEntries) diff --git a/src/plugins/python/pythonlanguageclient.h b/src/plugins/python/pythonlanguageclient.h index 82a4a73ea4f..41b559a0427 100644 --- a/src/plugins/python/pythonlanguageclient.h +++ b/src/plugins/python/pythonlanguageclient.h @@ -53,8 +53,6 @@ class PyLSConfigureAssistant : public QObject public: static PyLSConfigureAssistant *instance(); - static void updateEditorInfoBars(const Utils::FilePath &python, - LanguageClient::Client *client); static void openDocumentWithPython(const Utils::FilePath &python, TextEditor::TextDocument *document);