diff options
author | David Schulz <david.schulz@qt.io> | 2022-06-09 13:41:41 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2022-06-10 12:47:23 +0000 |
commit | 4c20a880e6395f43e5fc9770c53c1034d08847a4 (patch) | |
tree | 5e05d87f84ea896fede9ec939f3dd9c044a87dbf /src/plugins/python/pythoneditor.cpp | |
parent | ed22ef78543a41e334687b4c70493b8bd21ed7b3 (diff) | |
download | qt-creator-4c20a880e6395f43e5fc9770c53c1034d08847a4.tar.gz |
Python: remove python specific language client settings
Change-Id: Ic993d525f29c1925f7e64dfc6f5e053234fb4904
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/python/pythoneditor.cpp')
-rw-r--r-- | src/plugins/python/pythoneditor.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/python/pythoneditor.cpp b/src/plugins/python/pythoneditor.cpp index 562f69f5d7..32fd9e9266 100644 --- a/src/plugins/python/pythoneditor.cpp +++ b/src/plugins/python/pythoneditor.cpp @@ -108,7 +108,19 @@ static QWidget *createEditorWidget() class PythonDocument : public TextEditor::TextDocument { public: - PythonDocument() : TextEditor::TextDocument(Constants::C_PYTHONEDITOR_ID) {} + PythonDocument() : TextEditor::TextDocument(Constants::C_PYTHONEDITOR_ID) + { + connect(PythonSettings::instance(), + &PythonSettings::pylsEnabledChanged, + this, + [this](const bool enabled) { + if (!enabled) + return; + const Utils::FilePath &python = detectPython(filePath()); + if (python.exists()) + PyLSConfigureAssistant::openDocumentWithPython(python, this); + }); + } void setFilePath(const Utils::FilePath &filePath) override { |