summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-06 12:05:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-07 03:46:01 +0900
commit042799eb2a4e94d854b10a9db679e5b050cda38d (patch)
treee07d08b731996d45decb149838dc435f669b2c6b /desktop-widgets/diveplanner.cpp
parent130fd9e8c26097c0145478a1500e3c3e3ab4d9aa (diff)
downloadsubsurface-042799eb2a4e94d854b10a9db679e5b050cda38d.tar.gz
desktop-widgets: add comment why last SIGNAL/SLOT is not converted
The last SIGNAL/SLOT cannot be converted due to a limitation in the new connect() syntax, it does not "understand" default parameters. Signed-off-by: jan Iversen <jan@casacondor.com>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index 3d4bb2dab..4969a0c16 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -132,6 +132,10 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
view->setColumnHidden(CylindersModel::DEPTH, false);
view->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
connect(ui.cylinderTableWidget, &TableView::addButtonClicked, plannerModel, &DivePlannerPointsModel::addCylinder_clicked);
+
+ // addStop actually accept a call with no parameters, due to default parameters, but the connect() syntax without SIGNAL/SLOT
+ // does not understand default parameters and causes errors to be thrown.
+ // Continue to use old syntax, to avoid problems.
connect(ui.tableWidget, SIGNAL(addButtonClicked()), plannerModel, SLOT(addStop()));
connect(CylindersModel::instance(), &CylindersModel::dataChanged, GasSelectionModel::instance(), &GasSelectionModel::repopulate);