diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divetripmodel.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 2e9058d6e..5addeeb08 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -369,19 +369,17 @@ QString DiveItem::displayDuration() const QString DiveItem::displayTemperature() const { - QString str; struct dive *dive = get_dive_by_uniq_id(diveId); if (!dive->watertemp.mkelvin) - return str; + return QString(); return get_temperature_string(dive->watertemp, false); } QString DiveItem::displayTemperatureWithUnit() const { - QString str; struct dive *dive = get_dive_by_uniq_id(diveId); if (!dive->watertemp.mkelvin) - return str; + return QString(); return get_temperature_string(dive->watertemp, true); } @@ -403,14 +401,12 @@ QString DiveItem::displaySacWithUnit() const QString DiveItem::displayWeight() const { - QString str = weight_string(weight()); - return str; + return weight_string(weight()); } QString DiveItem::displayWeightWithUnit() const { - QString str = weight_string(weight()) + ((get_units()->weight == units::KG) ? tr("kg") : tr("lbs")); - return str; + return weight_string(weight()) + ((get_units()->weight == units::KG) ? tr("kg") : tr("lbs")); } int DiveItem::weight() const |