mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Grantlee: split out grantlee-only property from DiveObjectHelper
The cylindersObject list was only used by grantlee but not by the mobile code. Since it is quite heavy, split it out and thus don't generate it for every dive on mobile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
6a9df3bba3
commit
718c07c1a8
4 changed files with 32 additions and 10 deletions
|
@ -238,7 +238,6 @@ DiveObjectHelper::DiveObjectHelper(const struct dive *d) :
|
|||
singleWeight(d->weightsystems.nr <= 1),
|
||||
suit(d->suit ? d->suit : QString()),
|
||||
cylinders(formatCylinders(d)),
|
||||
cylinderObjects(makeCylinderObjects(d)),
|
||||
maxcns(d->maxcns),
|
||||
otu(d->otu),
|
||||
sumWeight(get_weight_string(weight_t { total_weight(d) }, true)),
|
||||
|
@ -249,6 +248,16 @@ DiveObjectHelper::DiveObjectHelper(const struct dive *d) :
|
|||
{
|
||||
}
|
||||
|
||||
DiveObjectHelperGrantlee::DiveObjectHelperGrantlee()
|
||||
{
|
||||
}
|
||||
|
||||
DiveObjectHelperGrantlee::DiveObjectHelperGrantlee(const struct dive *d) :
|
||||
DiveObjectHelper(d),
|
||||
cylinderObjects(makeCylinderObjects(d))
|
||||
{
|
||||
}
|
||||
|
||||
QString DiveObjectHelper::date() const
|
||||
{
|
||||
QDateTime localTime = QDateTime::fromMSecsSinceEpoch(1000 * timestamp, Qt::UTC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue