diff options
author | jan Iversen <jan@casacondor.com> | 2020-01-06 11:56:25 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-07 03:46:01 +0900 |
commit | 130fd9e8c26097c0145478a1500e3c3e3ab4d9aa (patch) | |
tree | fff5c202994f60da95faa88803cea2cdbd5195a2 | |
parent | 9a78c29b47efcfd4524ea2809b66dde3411d94b3 (diff) | |
download | subsurface-130fd9e8c26097c0145478a1500e3c3e3ab4d9aa.tar.gz |
desktop-widgets: replace connect() for CylindersModel.
Replace SIGNAL/SLOT in favor of new connect()
Signed-off-by: jan Iversen <jan@casacondor.com>
-rw-r--r-- | desktop-widgets/diveplanner.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 94ad748e6..3d4bb2dab 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -134,20 +134,13 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.cylinderTableWidget, &TableView::addButtonClicked, plannerModel, &DivePlannerPointsModel::addCylinder_clicked); connect(ui.tableWidget, SIGNAL(addButtonClicked()), plannerModel, SLOT(addStop())); - connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), - GasSelectionModel::instance(), SLOT(repopulate())); - connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)), - GasSelectionModel::instance(), SLOT(repopulate())); - connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - GasSelectionModel::instance(), SLOT(repopulate())); - connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), - plannerModel, SLOT(emitDataChanged())); - connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), - plannerModel, SIGNAL(cylinderModelEdited())); - connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)), - plannerModel, SIGNAL(cylinderModelEdited())); - connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)), - plannerModel, SIGNAL(cylinderModelEdited())); + connect(CylindersModel::instance(), &CylindersModel::dataChanged, GasSelectionModel::instance(), &GasSelectionModel::repopulate); + connect(CylindersModel::instance(), &CylindersModel::rowsInserted, GasSelectionModel::instance(), &GasSelectionModel::repopulate); + connect(CylindersModel::instance(), &CylindersModel::rowsRemoved, GasSelectionModel::instance(), &GasSelectionModel::repopulate); + connect(CylindersModel::instance(), &CylindersModel::dataChanged, plannerModel, &DivePlannerPointsModel::emitDataChanged); + connect(CylindersModel::instance(), &CylindersModel::dataChanged, plannerModel, &DivePlannerPointsModel::cylinderModelEdited); + connect(CylindersModel::instance(), &CylindersModel::rowsInserted, plannerModel, &DivePlannerPointsModel::cylinderModelEdited); + connect(CylindersModel::instance(), &CylindersModel::rowsRemoved, plannerModel, &DivePlannerPointsModel::cylinderModelEdited); connect(plannerModel, &DivePlannerPointsModel::calculatedPlanNotes, MainWindow::instance(), &MainWindow::setPlanNotes); |