Python: Simplify PyLSConfigureAssistant setup

Change-Id: Icdd8d0017a8fe71f579af6f19fa2b870f0677efc
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2024-01-15 17:26:18 +01:00
parent 5de41fb40d
commit 9c8e5d4cdb
3 changed files with 40 additions and 49 deletions

View File

@@ -47,29 +47,6 @@ private:
QHash<ProjectExplorer::Project *, QList<ProjectExplorer::ExtraCompiler *>> m_extraCompilers;
};
class PyLSConfigureAssistant : public QObject
{
Q_OBJECT
public:
static PyLSConfigureAssistant *instance();
static void openDocumentWithPython(const Utils::FilePath &python,
TextEditor::TextDocument *document);
private:
explicit PyLSConfigureAssistant(QObject *parent);
void handlePyLSState(const Utils::FilePath &python,
const PythonLanguageServerState &state,
TextEditor::TextDocument *document);
void resetEditorInfoBar(TextEditor::TextDocument *document);
void installPythonLanguageServer(const Utils::FilePath &python,
QPointer<TextEditor::TextDocument> document,
const Utils::FilePath &pylsPath);
QHash<Utils::FilePath, QList<TextEditor::TextDocument *>> m_infoBarEntries;
QHash<TextEditor::TextDocument *, QPointer<QFutureWatcher<PythonLanguageServerState>>>
m_runningChecks;
};
void openDocumentWithPython(const Utils::FilePath &python, TextEditor::TextDocument *document);
} // Python::Internal