Python: remove outdated pyls install toolbar earlier

Change-Id: I9ba67bffcff159523eb44b4f486c11fc37085fa8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-01-20 12:27:03 +01:00
parent 642c593481
commit e592e0e83f

View File

@@ -312,6 +312,7 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python,
void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python, void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python,
TextEditor::TextDocument *document) TextEditor::TextDocument *document)
{ {
instance()->resetEditorInfoBar(document);
if (!PythonSettings::pylsEnabled()) if (!PythonSettings::pylsEnabled())
return; return;
@@ -350,7 +351,6 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
if (state.state == PythonLanguageServerState::CanNotBeInstalled) if (state.state == PythonLanguageServerState::CanNotBeInstalled)
return; return;
resetEditorInfoBar(document);
Utils::InfoBar *infoBar = document->infoBar(); Utils::InfoBar *infoBar = document->infoBar();
if (state.state == PythonLanguageServerState::CanBeInstalled if (state.state == PythonLanguageServerState::CanBeInstalled
&& infoBar->canInfoBeAdded(installPylsInfoBarId)) { && infoBar->canInfoBeAdded(installPylsInfoBarId)) {