diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-11 15:35:21 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 15:46:11 -0800 |
commit | ae222f147cd1e32c4bf4802b303c63c6be42e796 (patch) | |
tree | e4c7abb532579530b610b2f6184585dabff3ba0a /subsurface-core | |
parent | 8ead18a43a5398de6748d2be1191dcd072ad24eb (diff) | |
download | subsurface-ae222f147cd1e32c4bf4802b303c63c6be42e796.tar.gz |
Simplify: removed location variable
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 5 | ||||
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index ee1beb271..e50dc91aa 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -34,8 +34,7 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) } DiveObjectHelper::DiveObjectHelper(struct dive *d) : - m_location(get_dive_location(d) ? QString::fromUtf8(get_dive_location(d)) : EMPTY_DIVE_STRING), - m_duration(get_dive_duration_string(d->duration.seconds, QObject::tr("h:"), QObject::tr("min"))), + m_duration(get_dive_duration_string(d->duration.seconds, QObject::tr("h:"), QObject::tr("min"))), m_depth(get_depth_string(d->dc.maxdepth.mm, true, true)), m_divemaster(d->divemaster ? d->divemaster : EMPTY_DIVE_STRING), m_buddy(d->buddy ? d->buddy : EMPTY_DIVE_STRING), @@ -150,7 +149,7 @@ QString DiveObjectHelper::time() const QString DiveObjectHelper::location() const { - return m_location; + return get_dive_location(m_dive) ? QString::fromUtf8(get_dive_location(m_dive)) : EMPTY_DIVE_STRING; } QString DiveObjectHelper::gps() const diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index b79ce43f5..f135466c4 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -64,7 +64,6 @@ public: private: QString m_date; QString m_time; - QString m_location; QString m_gps; QString m_duration; QString m_depth; |