From e4c90a0809ee4b751e0de72474f8a9a80d043bfa Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 21 Dec 2016 20:08:02 +0200 Subject: [PATCH] Fix warning "Explicitly capture the required scope variables". --HG-- branch : develop --- src/app/tape/tmainwindow.cpp | 6 +++--- src/app/valentina/dialogs/dialogincrements.cpp | 6 +++--- src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp | 2 +- src/libs/vtools/tools/vabstracttool.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 532cb0834..31a4693ad 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -1969,9 +1969,9 @@ void TMainWindow::InitWindow() connect(ui->comboBoxPMSystem, static_cast(&QComboBox::currentIndexChanged), this, &TMainWindow::SavePMSystem); - connect(ui->lineEditFind, &QLineEdit::textChanged, [=] (const QString &term){search->Find(term);}); - connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [=] (){search->FindPrevious();}); - connect(ui->toolButtonFindNext, &QToolButton::clicked, [=] (){search->FindNext();}); + connect(ui->lineEditFind, &QLineEdit::textChanged, [this] (const QString &term){search->Find(term);}); + connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [this] (){search->FindPrevious();}); + connect(ui->toolButtonFindNext, &QToolButton::clicked, [this] (){search->FindNext();}); connect(search.data(), &VTableSearch::HasResult, [this] (bool state) { diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index 2894f4d65..978d06108 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -110,9 +110,9 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par connect(ui->lineEditName, &QLineEdit::editingFinished, this, &DialogIncrements::SaveIncrName); connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrDescription); connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrFormula); - connect(ui->lineEditFind, &QLineEdit::textEdited, [=](const QString &term){search->Find(term);}); - connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [=](){search->FindPrevious();}); - connect(ui->toolButtonFindNext, &QToolButton::clicked, [=](){search->FindNext();}); + connect(ui->lineEditFind, &QLineEdit::textEdited, [this](const QString &term){search->Find(term);}); + connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [this](){search->FindPrevious();}); + connect(ui->toolButtonFindNext, &QToolButton::clicked, [this](){search->FindNext();}); connect(search.data(), &VTableSearch::HasResult, [this] (bool state) { diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index f00a16936..681edd61e 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -404,7 +404,7 @@ void DialogEditWrongFormula::InitVariables() Measurements(); // clear text filter every time when new radio button selected - auto ClearFilterFormulaInputs = [=] () { ui->filterFormulaInputs->clear(); }; + auto ClearFilterFormulaInputs = [this] () { ui->filterFormulaInputs->clear(); }; connect(ui->radioButtonStandardTable, &QRadioButton::clicked, this, &DialogEditWrongFormula::Measurements); connect(ui->radioButtonStandardTable, &QRadioButton::clicked, ClearFilterFormulaInputs); diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index b445c9ff9..5c8b22102 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -182,7 +182,7 @@ inline void VAbstractTool::AddVisualization() connect(scene, &VMainGraphicsScene::NewFactor, visual, &Visualization::SetFactor); scene->addItem(visual); - connect(visual, &Visualization::ToolTip, [=] (const QString &toolTip) {emit ToolTip(toolTip);}); + connect(visual, &Visualization::ToolTip, [this] (const QString &toolTip) {emit ToolTip(toolTip);}); vis = visual; }