From 0c558551f1fc45304a531b2d89cb9a449d2b66e1 Mon Sep 17 00:00:00 2001 From: Andrei Popa Date: Tue, 10 Dec 2024 17:37:27 +0200 Subject: [PATCH] general: fix warnings Signed-off-by: Andrei Popa --- plugins/regmap/src/registermapsettingsmenu.cpp | 2 +- plugins/regmap/src/registermaptool.cpp | 4 ++-- plugins/swiot/src/ad74413r/ad74413r.cpp | 1 + plugins/swiot/src/faults/faults.cpp | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/regmap/src/registermapsettingsmenu.cpp b/plugins/regmap/src/registermapsettingsmenu.cpp index b42835185a..2e32c41972 100644 --- a/plugins/regmap/src/registermapsettingsmenu.cpp +++ b/plugins/regmap/src/registermapsettingsmenu.cpp @@ -189,7 +189,7 @@ void RegisterMapSettingsMenu::startTutorial() auto settingsTutorialFinish = connect(settingsTutorial, &gui::TutorialBuilder::finished, this, &RegisterMapSettingsMenu::tutorialDone, Qt::UniqueConnection); - connect(settingsTutorial, &gui::TutorialBuilder::aborted, this, [=, this]() { + connect(settingsTutorial, &gui::TutorialBuilder::aborted, this, [settingsTutorialFinish, this]() { disconnect(settingsTutorialFinish); Q_EMIT tutorialAborted(); }); diff --git a/plugins/regmap/src/registermaptool.cpp b/plugins/regmap/src/registermaptool.cpp index baa56627d3..5ed1498711 100644 --- a/plugins/regmap/src/registermaptool.cpp +++ b/plugins/regmap/src/registermaptool.cpp @@ -193,7 +193,7 @@ void RegisterMapTool::startTutorial() controllerTutorial = connect( settings, &RegisterMapSettingsMenu::tutorialDone, this, - [=, this]() { deviceList->value(activeRegisterMap)->startTutorial(); }, Qt::UniqueConnection); + [this]() { deviceList->value(activeRegisterMap)->startTutorial(); }, Qt::UniqueConnection); connect(deviceList->value(activeRegisterMap), &DeviceRegisterMap::tutorialFinished, this, &RegisterMapTool::tutorialAborted); @@ -220,7 +220,7 @@ void RegisterMapTool::startSimpleTutorial() controllerTutorial = connect( settings, &RegisterMapSettingsMenu::tutorialDone, this, - [=, this]() { deviceList->value(activeRegisterMap)->startSimpleTutorial(); }, Qt::UniqueConnection); + [this]() { deviceList->value(activeRegisterMap)->startSimpleTutorial(); }, Qt::UniqueConnection); connect(deviceList->value(activeRegisterMap), &DeviceRegisterMap::simpleTutorialFinished, this, &RegisterMapTool::tutorialAborted); diff --git a/plugins/swiot/src/ad74413r/ad74413r.cpp b/plugins/swiot/src/ad74413r/ad74413r.cpp index 49f169ec31..9e65b11ca9 100644 --- a/plugins/swiot/src/ad74413r/ad74413r.cpp +++ b/plugins/swiot/src/ad74413r/ad74413r.cpp @@ -611,6 +611,7 @@ void Ad74413r::setupToolTemplate() connect(m_infoBtn, &InfoBtn::clicked, this, [this]() { m_infoBtn->generateInfoPopup(this); + connect(m_infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Ad74413r::startTutorial); connect(m_infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() { QDesktopServices::openUrl( diff --git a/plugins/swiot/src/faults/faults.cpp b/plugins/swiot/src/faults/faults.cpp index 6e00ad41cc..e12bc20387 100644 --- a/plugins/swiot/src/faults/faults.cpp +++ b/plugins/swiot/src/faults/faults.cpp @@ -56,6 +56,7 @@ Faults::Faults(QString uri, ToolMenuEntry *tme, QWidget *parent) InfoBtn *infoBtn = new InfoBtn(this, true); m_tool->addWidgetToTopContainerHelper(infoBtn, TTA_LEFT); + connect(infoBtn, &InfoBtn::clicked, this, [this, infoBtn]() { infoBtn->generateInfoPopup(this); connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Faults::startTutorial);