From 9a78c29b47efcfd4524ea2809b66dde3411d94b3 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 6 Jan 2020 11:46:43 +0100 Subject: desktop-widgets: replace connect() with parameter double. Replace SIGNAL() with QOverload::of() to allow new connect syntax. Signed-off-by: jan Iversen --- desktop-widgets/diveplanner.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 620f3b085..94ad748e6 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -157,7 +157,7 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.ATMPressure, QOverload::of(&QSpinBox::valueChanged), this, &DivePlannerWidget::atmPressureChanged); connect(ui.atmHeight, QOverload::of(&QSpinBox::valueChanged), this, &DivePlannerWidget::heightChanged); connect(ui.waterType, QOverload::of(&QComboBox::currentIndexChanged), this, &DivePlannerWidget::waterTypeChanged); - connect(ui.customSalinity, SIGNAL(valueChanged(double)), this, SLOT(customSalinityChanged(double))); + connect(ui.customSalinity, QOverload::of(&QDoubleSpinBox::valueChanged), this, &DivePlannerWidget::customSalinityChanged); connect(plannerModel, &DivePlannerPointsModel::startTimeChanged, this, &DivePlannerWidget::setupStartTime); // Creating (and canceling) the plan @@ -497,13 +497,13 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) connect(ui.descRate, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_descrate); connect(ui.ascRateStops, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascratestops); connect(ui.ascRateLast6m, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascratelast6m); - connect(ui.sacfactor, SIGNAL(valueChanged(double)), plannerShared::instance(), SLOT(set_sacfactor(double))); + connect(ui.sacfactor, QOverload::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_sacfactor); connect(ui.problemsolvingtime, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_problemsolvingtime); - connect(ui.bottompo2, SIGNAL(valueChanged(double)), plannerShared::instance(), SLOT(set_bottompo2(double))); - connect(ui.decopo2, SIGNAL(valueChanged(double)), plannerShared::instance(), SLOT(set_decopo2(double))); + connect(ui.bottompo2, QOverload::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_bottompo2); + connect(ui.decopo2, QOverload::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_decopo2); connect(ui.bestmixEND, QOverload::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_bestmixend); - connect(ui.bottomSAC, SIGNAL(valueChanged(double)), plannerShared::instance(), SLOT(set_bottomsac(double))); - connect(ui.decoStopSAC, SIGNAL(valueChanged(double)), plannerShared::instance(), SLOT(set_decosac(double))); + connect(ui.bottomSAC, QOverload::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_bottomsac); + connect(ui.decoStopSAC, QOverload::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_decosac); settingsChanged(); ui.gflow->setValue(prefs.gflow); -- cgit v1.2.3-70-g09d2