aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp16
1 files changed, 5 insertions, 11 deletions
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<TextEditor::TextDocument *> 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<TextEditor::TextDocument *> &documents : m_infoBarEntries)