summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-15 00:03:15 +0200
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-09-14 13:20:59 +0200
commit54720e6cff65ae860fb78431324b75203e71809a (patch)
tree1986f2fc328ef3f48ccdb70bf54ef0a3454ea81d /core/subsurface-qt/DiveObjectHelper.cpp
parent1b9581369af95bdf366f08c0d00d24c315d339bb (diff)
downloadsubsurface-54720e6cff65ae860fb78431324b75203e71809a.tar.gz
Mobile: move tripNrDive from DiveObjectHelper to DiveListModel
We don't want to generate a DiveObjectHelper numerous times for every item in the dive list. Therefore, return this datum directly from the model. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index d4bcfc4e0..e4945f007 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -315,12 +315,6 @@ QVector<CylinderObjectHelper> DiveObjectHelper::cylinderObjects() const
return res;
}
-int DiveObjectHelper::tripNrDives() const
-{
- struct dive_trip *dt = m_dive->divetrip;
- return dt ? dt->dives.nr : 0;
-}
-
int DiveObjectHelper::maxcns() const
{
return m_dive->maxcns;