From 0bb661c3e1dd0a30e6815f758c7e49e40604f899 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 11 Jan 2016 15:36:12 -0200 Subject: Simplify: removed duration and depth variables Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 6 ++---- subsurface-core/subsurface-qt/DiveObjectHelper.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'subsurface-core/subsurface-qt') diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index e50dc91aa..5e441d892 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -34,8 +34,6 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) } DiveObjectHelper::DiveObjectHelper(struct dive *d) : - 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), m_airTemp(get_temperature_string(d->airtemp, true)), @@ -158,12 +156,12 @@ QString DiveObjectHelper::gps() const } QString DiveObjectHelper::duration() const { - return m_duration; + return get_dive_duration_string(m_dive->duration.seconds, QObject::tr("h:"), QObject::tr("min")); } QString DiveObjectHelper::depth() const { - return m_depth; + return get_depth_string(m_dive->dc.maxdepth.mm, true, true); } QString DiveObjectHelper::divemaster() const diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index f135466c4..4a78fd779 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -65,8 +65,6 @@ private: QString m_date; QString m_time; QString m_gps; - QString m_duration; - QString m_depth; QString m_divemaster; QString m_buddy; QString m_airTemp; -- cgit v1.2.3-70-g09d2