summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp
index bf131a73c1..76e6fc2cb3 100644
--- a/src/plugins/python/pythonlanguageclient.cpp
+++ b/src/plugins/python/pythonlanguageclient.cpp
@@ -614,7 +614,7 @@ void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python,
QPointer<CheckPylsWatcher> watcher = new CheckPylsWatcher();
// cancel and delete watcher after a 10 second timeout
- QTimer::singleShot(10000, this, [watcher]() {
+ QTimer::singleShot(10000, instance(), [watcher]() {
if (watcher) {
watcher->cancel();
watcher->deleteLater();
@@ -623,11 +623,11 @@ void PyLSConfigureAssistant::openDocumentWithPython(const FilePath &python,
connect(watcher,
&CheckPylsWatcher::resultReadyAt,
- this,
+ instance(),
[=, document = QPointer<TextEditor::TextDocument>(document)]() {
if (!document || !watcher)
return;
- handlePyLSState(python, watcher->result(), document);
+ instance()->handlePyLSState(python, watcher->result(), document);
watcher->deleteLater();
});
watcher->setFuture(Utils::runAsync(&checkPythonLanguageServer, python));