From 620c004e6aaae550ade747f46a5cf51a3ed8594c Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 21 Dec 2023 08:59:29 +0100
Subject: [PATCH] rm 'this' before lambda

---
 GUI/Model/Model/DatafilesTree.cpp         |  4 ++--
 GUI/Model/Model/FitParameterModel.cpp     |  3 +--
 GUI/View/Main/AboutDialog.cpp             |  2 +-
 GUI/View/Main/ActionManager.cpp           | 12 +++++-------
 GUI/View/Tuning/ParameterTuningWidget.cpp |  3 +--
 5 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/GUI/Model/Model/DatafilesTree.cpp b/GUI/Model/Model/DatafilesTree.cpp
index bdafd1e4caa..3a497ed271d 100644
--- a/GUI/Model/Model/DatafilesTree.cpp
+++ b/GUI/Model/Model/DatafilesTree.cpp
@@ -244,11 +244,11 @@ bool DatafilesTree::isHeadline(const QModelIndex& index) const
 void DatafilesTree::updateSubscriptions()
 {
     for (auto* item : m_items[0])
-        connect(item, &DatafileItem::importContentsProcessed, this,
+        connect(item, &DatafileItem::importContentsProcessed,
                 [this, item] { onContentsProcessed(item); });
 
     for (auto* item : m_items[1])
-        connect(item, &DatafileItem::importContentsProcessed, this,
+        connect(item, &DatafileItem::importContentsProcessed,
                 [this, item] { onContentsProcessed(item); });
 }
 
diff --git a/GUI/Model/Model/FitParameterModel.cpp b/GUI/Model/Model/FitParameterModel.cpp
index 2395bf750c1..466853eb8dd 100644
--- a/GUI/Model/Model/FitParameterModel.cpp
+++ b/GUI/Model/Model/FitParameterModel.cpp
@@ -31,8 +31,7 @@ FitParameterModel::FitParameterModel(FitParameterContainerItem* fitParContainer,
     addColumn(COL_MAX, "Max", "Upper bound on fit parameter value");
 
     connectContainer();
-    connect(fitParContainer, &QObject::destroyed, this,
-            [this] { m_fitParameterContainer = nullptr; });
+    connect(fitParContainer, &QObject::destroyed, [this] { m_fitParameterContainer = nullptr; });
     connect(jobItem, &QObject::destroyed, [this] { m_jobItem = nullptr; });
 }
 
diff --git a/GUI/View/Main/AboutDialog.cpp b/GUI/View/Main/AboutDialog.cpp
index 5850b72f006..5f5f7d8146d 100644
--- a/GUI/View/Main/AboutDialog.cpp
+++ b/GUI/View/Main/AboutDialog.cpp
@@ -153,6 +153,6 @@ AboutDialog::AboutDialog(QWidget* parent)
     static const char mydata[] = {0x64, 0x65, 0x76, 0x73};
     QByteArray b = QByteArray::fromRawData(mydata, sizeof(mydata));
     auto* f = new ShortcodeFilter(b, this);
-    connect(f, &ShortcodeFilter::found, parent, [this] { layout()->addWidget(createLogoLabel()); });
+    connect(f, &ShortcodeFilter::found, [this] { layout()->addWidget(createLogoLabel()); });
     installEventFilter(f);
 }
diff --git a/GUI/View/Main/ActionManager.cpp b/GUI/View/Main/ActionManager.cpp
index 770d0e24293..d651b1891d3 100644
--- a/GUI/View/Main/ActionManager.cpp
+++ b/GUI/View/Main/ActionManager.cpp
@@ -86,16 +86,14 @@ void ActionManager::createActions()
     m_openAction = new QAction("&Open Project", m_mainWindow);
     m_openAction->setShortcuts(QKeySequence::Open);
     m_openAction->setStatusTip("Open an existing project");
-    connect(m_openAction, &QAction::triggered, projectManager,
-            [projectManager] { projectManager->openProject(); });
+    connect(m_openAction, &QAction::triggered, [projectManager] { projectManager->openProject(); });
 
     // save project action
     m_saveAction = new QAction("&Save Project", m_mainWindow);
     m_saveAction->setShortcuts(QKeySequence::Save);
     m_saveAction->setStatusTip("Save project");
     m_saveAction->setShortcutContext(Qt::ApplicationShortcut);
-    connect(m_saveAction, &QAction::triggered, projectManager,
-            [projectManager] { projectManager->saveProject(); });
+    connect(m_saveAction, &QAction::triggered, [projectManager] { projectManager->saveProject(); });
 
     // save-as project action
     m_saveAsAction = new QAction("Save &As...", m_mainWindow);
@@ -118,7 +116,7 @@ void ActionManager::createActions()
     // visit web doc action
     m_webdocAction = new QAction("&Visit web docs", this);
     m_webdocAction->setStatusTip("Open BornAgain documentation in default browser");
-    connect(m_webdocAction, &QAction::triggered, this,
+    connect(m_webdocAction, &QAction::triggered,
             [] { QDesktopServices::openUrl(QUrl("https://www.bornagainproject.org/latest")); });
 
     // about application action
@@ -238,8 +236,8 @@ void ActionManager::onAboutToShowSettingsMenu()
     auto* styleMenu = m_settingsMenu->addMenu("Interface Style");
     auto* styleGroup = new QButtonGroup(this);
     styleGroup->setExclusive(true);
-    const auto addStyleAction = [this, styleGroup, styleMenu](const QString& text,
-                                                              ApplicationSettings::Style style) {
+    const auto addStyleAction = [styleGroup, styleMenu](const QString& text,
+							ApplicationSettings::Style style) {
         auto* action = new QWidgetAction(styleMenu);
         auto* radioButton = new QRadioButton(text, styleMenu);
         radioButton->setStyleSheet("");
diff --git a/GUI/View/Tuning/ParameterTuningWidget.cpp b/GUI/View/Tuning/ParameterTuningWidget.cpp
index 1817fc431af..705e67ceca3 100644
--- a/GUI/View/Tuning/ParameterTuningWidget.cpp
+++ b/GUI/View/Tuning/ParameterTuningWidget.cpp
@@ -122,8 +122,7 @@ void ParameterTuningWidget::setJobItem(JobItem* job_item)
     updateParameterModel();
     updateDragAndDropSettings();
 
-    connect(m_job_item, &JobItem::jobStatusChanged, this,
-            [this](const JobStatus) { updateJobStatus(); });
+    connect(m_job_item, &JobItem::jobStatusChanged, [this](const JobStatus) { updateJobStatus(); });
 
     updateJobStatus();
 }
-- 
GitLab