Python: close all info bars after language server setup

Change-Id: I607f7cb5a31f3db0c7d7d77011860a1ea87eb8d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-10-18 10:31:14 +02:00
parent 088d5c0f77
commit 10c94994db
6 changed files with 134 additions and 82 deletions

View File

@@ -297,23 +297,10 @@ void PythonRunConfiguration::updateLanguageServer()
const FilePath python(FilePath::fromUserInput(interpreter()));
if (const StdIOSettings *lsSetting = languageServerForPython(python)) {
if (Client *client = LanguageClientManager::clientForSetting(lsSetting).value(0)) {
for (FilePath &file : project()->files(Project::AllFiles)) {
if (auto document = TextEditor::TextDocument::textDocumentForFilePath(file)) {
if (document->mimeType() == Constants::C_PY_MIMETYPE) {
resetEditorInfoBar(document);
LanguageClientManager::reOpenDocumentWithClient(document, client);
}
}
}
}
}
for (FilePath &file : project()->files(Project::AllFiles)) {
if (auto document = TextEditor::TextDocument::textDocumentForFilePath(file)) {
if (document->mimeType() == Constants::C_PY_MIMETYPE)
updateEditorInfoBar(python, document);
PyLSConfigureAssistant::instance()->openDocumentWithPython(python, document);
}
}
}