summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divetripmodel.cpp4
-rw-r--r--qt-models/yearlystatisticsmodel.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index c57541ccd..0293f6a45 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -343,7 +343,9 @@ int DiveItem::countPhotos(dive *dive) const
QString DiveItem::displayDuration() const
{
struct dive *dive = get_dive_by_uniq_id(diveId);
- return get_dive_duration_string(dive->duration.seconds, ":", "m", "s", dive->dc.divemode == FREEDIVE);
+ return get_dive_duration_string(dive->duration.seconds, "", "", "", ":", dive->dc.divemode == FREEDIVE);
+ // Next line is test for alternative display with units
+ // return get_dive_duration_string(dive->duration.seconds, tr("h"), tr("min"), "", ":", dive->dc.divemode == FREEDIVE);
}
QString DiveItem::displayTemperature() const
diff --git a/qt-models/yearlystatisticsmodel.cpp b/qt-models/yearlystatisticsmodel.cpp
index b27dc8140..54941ac80 100644
--- a/qt-models/yearlystatisticsmodel.cpp
+++ b/qt-models/yearlystatisticsmodel.cpp
@@ -61,7 +61,7 @@ QVariant YearStatisticsItem::data(int column, int role) const
ret = stats_interval.selection_size;
break;
case TOTAL_TIME:
- ret = get_time_string(stats_interval.total_time.seconds, 0);
+ ret = get_dive_duration_string(stats_interval.total_time.seconds, tr("h"), tr("min"), tr("sec"), " ");
break;
case AVERAGE_TIME:
ret = get_minutes(stats_interval.total_time.seconds / stats_interval.selection_size);