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>
This commit is contained in:
Berthold Stoeger 2019-09-01 00:18:15 +02:00 committed by Dirk Hohndel
parent fe07a47989
commit 4eaf6b20be
3 changed files with 23 additions and 43 deletions

View file

@ -19,9 +19,6 @@ public:
explicit MapLocation(struct dive_site *ds, QGeoCoordinate coord, QString name, bool selected);
QVariant getRole(int role) const;
QGeoCoordinate coordinate();
void setCoordinate(QGeoCoordinate coord);
struct dive_site *divesite();
enum Roles {
RoleDivesite = Qt::UserRole + 1,
@ -32,12 +29,10 @@ public:
RoleIsSelected
};
private:
struct dive_site *m_ds;
QGeoCoordinate m_coordinate;
QString m_name;
public:
bool m_selected = false;
struct dive_site *divesite;
QGeoCoordinate coordinate;
QString name;
bool selected = false;
};
class MapLocationModel : public QAbstractListModel