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:
Tomaz Canabrava 2014-05-21 21:38:26 -03:00 committed by Dirk Hohndel
parent e249fe8703
commit c6ad04d076
2 changed files with 3 additions and 9 deletions

View file

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

View file

@ -80,7 +80,6 @@ slots:
void deleteTemporaryPlan();
void loadFromDive(dive *d);
void restoreBackupDive();
void emitCylinderModelEdited();
signals:
void planCreated();