aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-02-05 20:50:49 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-02-06 08:34:44 +0000
commit8bcc78a04429f2736971054f15a4e3d4a8903183 (patch)
tree3f9e846d6a4c189ab1afde6f55700bc69cc3507b /src/plugins/python/pythonlanguageclient.cpp
parent97e582c3c0edbf9e646b9df667823bead5dd5e46 (diff)
Various plugins: Fix some more C++20 warnings about [=] captures
Change-Id: If20aac4320c84096a07d67cc137886638286acf8 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp
index dcba4d1ac61..dbe6c434de6 100644
--- a/src/plugins/python/pythonlanguageclient.cpp
+++ b/src/plugins/python/pythonlanguageclient.cpp
@@ -283,7 +283,8 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python,
auto install = new PipInstallTask(python);
- connect(install, &PipInstallTask::finished, this, [=](const bool success) {
+ connect(install, &PipInstallTask::finished, this,
+ [this, python, document, install](const bool success) {
const QList<TextEditor::TextDocument *> additionalDocuments = m_infoBarEntries.take(python);
if (success) {
if (PyLSClient *client = clientForPython(python)) {
@@ -323,10 +324,8 @@ void PyLSConfigureAssistant::openDocument(const FilePath &python, TextEditor::Te
}
});
- connect(watcher,
- &CheckPylsWatcher::resultReadyAt,
- this,
- [=, document = QPointer<TextEditor::TextDocument>(document)]() {
+ connect(watcher, &CheckPylsWatcher::resultReadyAt, this,
+ [this, watcher, python, document = QPointer<TextEditor::TextDocument>(document)] {
if (!document || !watcher)
return;
handlePyLSState(python, watcher->result(), document);
@@ -355,8 +354,8 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
Utils::InfoBarEntry info(installPylsInfoBarId,
message,
Utils::InfoBarEntry::GlobalSuppression::Enabled);
- info.addCustomButton(Tr::tr("Install"), [=]() {
- this->installPythonLanguageServer(python, document, state.pylsModulePath);
+ info.addCustomButton(Tr::tr("Install"), [this, python, document, state] {
+ installPythonLanguageServer(python, document, state.pylsModulePath);
});
infoBar->addInfo(info);
m_infoBarEntries[python] << document;