Dive site: pass dive-site pointer to nr_of_dives_at_dive_site()

Instead of passing a uuid, pass a pointer to the dive site.
This is small step in an effort to remove uuids.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-23 18:31:39 +02:00 committed by Dirk Hohndel
parent d3a7c5448f
commit 14ab95608c
3 changed files with 6 additions and 4 deletions

View file

@ -492,7 +492,7 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
} else {
int distanceMeters = get_distance(&ds->location, &currentDiveSite->location);
QString distance = distance_string(distanceMeters);
int nr = nr_of_dives_at_dive_site(ds->uuid, false);
int nr = nr_of_dives_at_dive_site(ds, false);
bottomText += tr(" (~%1 away").arg(distance);
bottomText += tr(", %n dive(s) here)", "", nr);
}