summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-19 06:38:37 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-19 20:12:59 +0900
commitcae51ff0aa29d0e8ae312069a7473ff7cc901602 (patch)
tree05524aa816e70813b8e153f5916740d7ee743e84 /qt-ui/profile
parentc4899aa8f1ba9ec97818bc138c0dd63f4d02b683 (diff)
downloadsubsurface-cae51ff0aa29d0e8ae312069a7473ff7cc901602.tar.gz
Change get_dive_by_diveid to get_dive_by_uniq_id
The original name was a really bad choice as we have a 'diveid' as part of struct divecomputer - and that is not the diveid that is being used here. Instead we use the 'id' member of struct dive which holds the "unique ID" for this dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp2
-rw-r--r--qt-ui/profile/diveprofileitem.cpp4
-rw-r--r--qt-ui/profile/profilewidget2.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index 990564fbb..2fe636a4b 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -178,7 +178,7 @@ void DivePlotDataModel::emitDataChanged()
void DivePlotDataModel::calculateDecompression()
{
- struct dive *d = get_dive_by_diveid(id());
+ struct dive *d = get_dive_by_uniq_id(id());
struct divecomputer *dc = select_dc(d);
init_decompression(d);
calculate_deco_information(d, dc, &pInfo, false);
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 1615be87f..6f4c2a599 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -427,7 +427,7 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
int last_pressure[MAX_CYLINDERS] = { 0, };
int last_time[MAX_CYLINDERS] = { 0, };
struct plot_data *entry;
- struct dive *dive = get_dive_by_diveid(dataModel->id());
+ struct dive *dive = get_dive_by_uniq_id(dataModel->id());
cyl = -1;
for (int i = 0, count = dataModel->rowCount(); i < count; i++) {
@@ -489,7 +489,7 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
QPen pen;
pen.setCosmetic(true);
pen.setWidth(2);
- struct dive *d = get_dive_by_diveid(dataModel->id());
+ struct dive *d = get_dive_by_uniq_id(dataModel->id());
struct plot_data *entry = dataModel->data().entry;
Q_FOREACH(const QPolygonF & poly, polygons) {
for (int i = 1, count = poly.count(); i < count; i++, entry++) {
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index d2d01a384..da0e37f2b 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -227,7 +227,7 @@ void ProfileWidget2::replot()
{
int diveId = dataModel->id();
dataModel->clear();
- plotDives(QList<dive *>() << get_dive_by_diveid(diveId));
+ plotDives(QList<dive *>() << get_dive_by_uniq_id(diveId));
}
void ProfileWidget2::setupItemSizes()
@@ -808,7 +808,7 @@ void ProfileWidget2::changeGas()
int diveId = dataModel->id();
int o2, he;
int seconds = timeAxis->valueAt(scenePos);
- struct dive *d = get_dive_by_diveid(diveId);
+ struct dive *d = get_dive_by_uniq_id(diveId);
validate_gas(gas.toUtf8().constData(), &o2, &he);
add_gas_switch_event(d, get_dive_dc(d, diveComputer), seconds, get_gasidx(d, o2, he));