mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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)),
|
connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||||
GasSelectionModel::instance(), SLOT(repopulate()));
|
GasSelectionModel::instance(), SLOT(repopulate()));
|
||||||
connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
|
connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
|
||||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||||
connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)),
|
connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)),
|
||||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||||
connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||||
plannerModel, SLOT(emitCylinderModelEdited()));
|
plannerModel, SIGNAL(cylinderModelEdited()));
|
||||||
|
|
||||||
ui.tableWidget->setBtnToolTip(tr("add dive data point"));
|
ui.tableWidget->setBtnToolTip(tr("add dive data point"));
|
||||||
connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime)));
|
connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime)));
|
||||||
|
@ -1067,11 +1067,6 @@ bool DivePlannerPointsModel::recalcQ()
|
||||||
return recalc;
|
return recalc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivePlannerPointsModel::emitCylinderModelEdited()
|
|
||||||
{
|
|
||||||
cylinderModelEdited();
|
|
||||||
}
|
|
||||||
|
|
||||||
int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const
|
int DivePlannerPointsModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
return COLUMNS;
|
return COLUMNS;
|
||||||
|
|
|
@ -80,7 +80,6 @@ slots:
|
||||||
void deleteTemporaryPlan();
|
void deleteTemporaryPlan();
|
||||||
void loadFromDive(dive *d);
|
void loadFromDive(dive *d);
|
||||||
void restoreBackupDive();
|
void restoreBackupDive();
|
||||||
void emitCylinderModelEdited();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void planCreated();
|
void planCreated();
|
||||||
|
|
Loading…
Add table
Reference in a new issue