aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-21 21:38:26 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-22 14:32:26 +0900
commitc6ad04d076a24001ded7bc099498dd6deb97949b (patch)
treed92f8d1bc6074214732b01eaf214384992ea14c6
parente249fe870396e18d53939ca37c9391c858a46d8c (diff)
downloadsubsurface-c6ad04d076a24001ded7bc099498dd6deb97949b.tar.gz
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>
-rw-r--r--qt-ui/diveplanner.cpp11
-rw-r--r--qt-ui/diveplanner.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index aabd33125..f4f3d5036 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -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;
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 506953275..94fcdeb53 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -80,7 +80,6 @@ slots:
void deleteTemporaryPlan();
void loadFromDive(dive *d);
void restoreBackupDive();
- void emitCylinderModelEdited();
signals:
void planCreated();