From c37e9a6c5b1e52017421a5c27c3e6a3180793fd7 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 27 Oct 2023 08:57:53 +0200
Subject: [PATCH] GUI::Util::createScientificSpinBoxRow rm unused argument
 'slot'

---
 GUI/View/Numeric/NumWidgetUtil.cpp | 6 +-----
 GUI/View/Numeric/NumWidgetUtil.h   | 6 ++----
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/GUI/View/Numeric/NumWidgetUtil.cpp b/GUI/View/Numeric/NumWidgetUtil.cpp
index 852a7e89520..ee3bb47561c 100644
--- a/GUI/View/Numeric/NumWidgetUtil.cpp
+++ b/GUI/View/Numeric/NumWidgetUtil.cpp
@@ -34,8 +34,7 @@ DoubleSpinBox* GUI::Util::createDoubleSpinBoxRow(QFormLayout* parentLayout, Doub
 
 
 ScientificSpinBox* GUI::Util::createScientificSpinBox(QFormLayout* parentLayout,
-                                                      const DoubleProperty& d,
-                                                      function<void(double)> slot)
+                                                      const DoubleProperty& d)
 {
     auto* spinBox = new ScientificSpinBox(parentLayout->parentWidget());
     spinBox->setFocusPolicy(Qt::StrongFocus);
@@ -45,9 +44,6 @@ ScientificSpinBox* GUI::Util::createScientificSpinBox(QFormLayout* parentLayout,
     spinBox->setValue(d.value());
     parentLayout->addRow(d.label() + ":", spinBox);
 
-    if (slot)
-        QObject::connect(spinBox, &ScientificSpinBox::valueChanged, [=](double v) { slot(v); });
-
     return spinBox;
 }
 
diff --git a/GUI/View/Numeric/NumWidgetUtil.h b/GUI/View/Numeric/NumWidgetUtil.h
index 01a3a79ae4d..2973ece238d 100644
--- a/GUI/View/Numeric/NumWidgetUtil.h
+++ b/GUI/View/Numeric/NumWidgetUtil.h
@@ -47,10 +47,8 @@ DoubleSpinBox* createDoubleSpinBoxRow(QFormLayout* parentLayout, DoubleProperty&
 //! would take place when just scrolling through the form.
 //!
 //! No connections to update the property will be established! Therefore changes in the spin box
-//! will *not* be notified to the property. The additional (and optional) slot can be used to be
-//! notified about a value change.
-ScientificSpinBox* createScientificSpinBox(QFormLayout* parentLayout, const DoubleProperty& d,
-                                           std::function<void(double)> slot = nullptr);
+//! will *not* be notified to the property.
+ScientificSpinBox* createScientificSpinBox(QFormLayout* parentLayout, const DoubleProperty& d);
 
 //! Creates an updatable checkbox
 QCheckBox* createCheckBox(const QString& title, std::function<bool()> getter,
-- 
GitLab