mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Code Cleanup: connections can be made between signals.
A signal can connect to another signal, so I removed a slot that had the sole purpose to call another signal and replaced that with a direct call. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e249fe8703
commit
c6ad04d076
2 changed files with 3 additions and 9 deletions
|
@ -982,11 +982,11 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
|
|||
connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||
GasSelectionModel::instance(), SLOT(repopulate()));
|
||||
connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
|
||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
||||
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||
connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)),
|
||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
||||
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||
connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
||||
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||
|
||||
ui.tableWidget->setBtnToolTip(tr("add dive data point"));
|
||||
connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime)));
|
||||
|
@ -1067,11 +1067,6 @@ bool DivePlannerPointsModel::recalcQ()
|
|||
return recalc;
|
||||
}
|
||||
|
||||
void DivePlannerPointsModel::emitCylinderModelEdited()
|
||||
{
|
||||
cylinderModelEdited();
|
||||
}
|
||||
|
||||
int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
return COLUMNS;
|
||||
|
|
|
@ -80,7 +80,6 @@ slots:
|
|||
void deleteTemporaryPlan();
|
||||
void loadFromDive(dive *d);
|
||||
void restoreBackupDive();
|
||||
void emitCylinderModelEdited();
|
||||
|
||||
signals:
|
||||
void planCreated();
|
||||
|
|
Loading…
Reference in a new issue