Simplify: removed location variable

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-01-11 15:35:21 -02:00 committed by Dirk Hohndel
parent 8ead18a43a
commit ae222f147c
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -64,7 +64,6 @@ public:
private:
QString m_date;
QString m_time;
QString m_location;
QString m_gps;
QString m_duration;
QString m_depth;