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

@@ -35,19 +35,6 @@
namespace Python {
namespace Internal {
static void documentOpened(Core::IDocument *document)
{
auto textDocument = qobject_cast<TextEditor::TextDocument *>(document);
if (!textDocument || textDocument->mimeType() != Constants::C_PY_MIMETYPE)
return;
const Utils::FilePath &python = detectPython(textDocument->filePath());
if (!python.exists())
return;
updateEditorInfoBar(python, textDocument);
}
PythonEditorFactory::PythonEditorFactory()
{
setId(Constants::C_PYTHONEDITOR_ID);
@@ -68,7 +55,7 @@ PythonEditorFactory::PythonEditorFactory()
setCodeFoldingSupported(true);
connect(Core::EditorManager::instance(), &Core::EditorManager::documentOpened,
this, documentOpened);
this, &PyLSConfigureAssistant::documentOpened);
}
} // namespace Internal