Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general: Fix implicit capture of 'this' warnings #1849

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions plugins/dac/src/dacinstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ DacInstrument::DacInstrument(const Connection *conn, QWidget *parent)

rightMenuBtnGrp->addButton(settingsBtn);
rightMenuBtnGrp->addButton(devicesBtn->button());
connect(infoBtn, &InfoBtn::clicked, this, [=]() {
connect(infoBtn, &InfoBtn::clicked, this, [this]() {
infoBtn->generateInfoPopup(this);

connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); });

connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &DacInstrument::startTutorial);
connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() {
QDesktopServices::openUrl(
QUrl("https://analogdevicesinc.github.io/scopy/plugins/dac/dac.html"));
Expand Down
5 changes: 4 additions & 1 deletion plugins/dac/src/dacinstrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ public Q_SLOTS:
void startTutorial();
void runToggled(bool toggled);
void dacRunning(bool toggled);

Q_SIGNALS:
void running(bool toggled);

private Q_SLOTS:
void startDdsTutorial();

private:
void setupDacDataManagers();
MenuControlButton *addDevice(DacDataManager *dev, QWidget *parent);
void addDeviceToStack(DacDataManager *dev, MenuControlButton *btn);
void setupDacDataDeviceButtons();
void startBufferTutorial();
void startBufferNonCyclicTutorial();
void startDdsTutorial();
void abortTutorial();

const Connection *m_conn;
Expand Down
4 changes: 3 additions & 1 deletion plugins/datalogger/include/datalogger/datamonitortool.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class SCOPY_DATALOGGER_EXPORT DatamonitorTool : public QWidget
void settingsTitleChanged(QString newTitle);
void requestDeleteTool();

private Q_SLOTS:
void startTutorial();

private:
MenuControlButton *monitorsButton;
DataAcquisitionManager *m_dataAcquisitionManager;
Expand Down Expand Up @@ -92,7 +95,6 @@ class SCOPY_DATALOGGER_EXPORT DatamonitorTool : public QWidget
MonitorSelectionMenu *m_monitorSelectionMenu;

void initTutorialProperties();
void startTutorial();
};
} // namespace scopy::datamonitor
#endif // DATAMONITORTOOL_H
5 changes: 2 additions & 3 deletions plugins/datalogger/src/datamonitortool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ DatamonitorTool::DatamonitorTool(DataAcquisitionManager *dataAcquisitionManager,

infoBtn = new InfoBtn(this, true);

connect(infoBtn, &InfoBtn::clicked, this, [=]() {
connect(infoBtn, &InfoBtn::clicked, this, [this]() {
infoBtn->generateInfoPopup(this);

connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); });

connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &DatamonitorTool::startTutorial);
connect(infoBtn->getDocumentationButton(), &QPushButton::clicked, this, [=]() {
QDesktopServices::openUrl(
QUrl("https://analogdevicesinc.github.io/scopy/plugins/datalogger/datalogger.html"));
Expand Down
4 changes: 2 additions & 2 deletions plugins/swiot/src/ad74413r/ad74413r.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ void Ad74413r::setupToolTemplate()
m_singleBtn->setChecked(false);
m_configBtn = createConfigBtn();

connect(m_infoBtn, &InfoBtn::clicked, this, [=]() {
connect(m_infoBtn, &InfoBtn::clicked, this, [this]() {
m_infoBtn->generateInfoPopup(this);
connect(m_infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); });
connect(m_infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Ad74413r::startTutorial);
connect(m_infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() {
QDesktopServices::openUrl(
QUrl("https://analogdevicesinc.github.io/scopy/plugins/swiot1l/ad74413r.html"));
Expand Down
4 changes: 2 additions & 2 deletions plugins/swiot/src/faults/faults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ 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, [=]() {
connect(infoBtn, &InfoBtn::clicked, this, [this, infoBtn]() {
infoBtn->generateInfoPopup(this);
connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); });
connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Faults::startTutorial);
connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() {
QDesktopServices::openUrl(
QUrl("https://analogdevicesinc.github.io/scopy/plugins/swiot1l/faults.html"));
Expand Down
4 changes: 2 additions & 2 deletions plugins/swiot/src/max14906/max14906.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Max14906::Max14906(QString uri, ToolMenuEntry *tme, QWidget *parent)

InfoBtn *infoBtn = new InfoBtn(this, true);
m_tool->addWidgetToTopContainerHelper(infoBtn, TTA_LEFT);
connect(infoBtn, &InfoBtn::clicked, this, [=]() {
connect(infoBtn, &InfoBtn::clicked, this, [this, infoBtn]() {
infoBtn->generateInfoPopup(this);
connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, [=]() { this->startTutorial(); });
connect(infoBtn->getTutorialButton(), &QPushButton::clicked, this, &Max14906::startTutorial);

connect(infoBtn->getDocumentationButton(), &QAbstractButton::clicked, this, [=, this]() {
QDesktopServices::openUrl(
Expand Down
Loading