summaryrefslogtreecommitdiffstats
path: root/map-widget/qmlmapwidgethelper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-01 00:18:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commit4eaf6b20bece25516d6ba29e372ac84de690cde7 (patch)
treeecabf091bf6166fd5f67b4acc6f83fae817891da /map-widget/qmlmapwidgethelper.cpp
parentfe07a47989fbcf4b95989d6d32e51da07a5cc211 (diff)
downloadsubsurface-4eaf6b20bece25516d6ba29e372ac84de690cde7.tar.gz
Cleanup: remove accessor functions from MapLocation
Let's face it: this is a value type. No point in having Java-style getters and setters. Replace by plain old and boring member variables. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'map-widget/qmlmapwidgethelper.cpp')
-rw-r--r--map-widget/qmlmapwidgethelper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp
index fe43c6fce..9dba8bfd3 100644
--- a/map-widget/qmlmapwidgethelper.cpp
+++ b/map-widget/qmlmapwidgethelper.cpp
@@ -135,7 +135,7 @@ void MapWidgetHelper::selectedLocationChanged(struct dive_site *ds_in)
MapLocation *location = m_mapLocationModel->getMapLocation(ds_in);
if (!location)
return;
- QGeoCoordinate locationCoord = location->coordinate();
+ QGeoCoordinate locationCoord = location->coordinate;
for_each_dive (idx, dive) {
struct dive_site *ds = get_dive_site_for_dive(dive);
@@ -149,7 +149,7 @@ void MapWidgetHelper::selectedLocationChanged(struct dive_site *ds_in)
selectedDiveIds.append(idx);
}
#else // the mobile version doesn't support multi-dive selection
- if (ds == location->divesite())
+ if (ds == location->divesite)
selectedDiveIds.append(dive->id); // use id here instead of index
}
int last; // get latest dive chronologically
@@ -237,7 +237,7 @@ void MapWidgetHelper::updateCurrentDiveSiteCoordinatesFromMap(struct dive_site *
{
MapLocation *loc = m_mapLocationModel->getMapLocation(ds);
if (loc)
- loc->setCoordinate(coord);
+ loc->coordinate = coord;
location_t location = mk_location(coord);
emit coordinatesChanged(ds, location);
}