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>
This commit is contained in:
jan Iversen 2020-01-06 12:05:32 +01:00 committed by Dirk Hohndel
parent 130fd9e8c2
commit 042799eb2a

View file

@ -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);