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>
This commit is contained in:
Dirk Hohndel 2014-05-19 06:38:37 +09:00
parent c4899aa8f1
commit cae51ff0aa
5 changed files with 15 additions and 15 deletions

View file

@ -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++) {