[PATCH 2/2] qthelper.cpp: don't hardcode the Dive m_duration as minutes
Lubomir I. Ivanov
neolit123 at gmail.com
Wed Sep 9 08:52:46 PDT 2015
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
get_dive_duration_string() should be used in a similiar way
to socialnetworks.cpp so that the Dive::put_duration()
method sets the variable in the h:min format.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
qthelper.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qthelper.cpp b/qthelper.cpp
index 4ccc16d..a4dc090 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -191,7 +191,7 @@ void Dive::put_depth()
void Dive::put_duration()
{
- m_duration = QString::number(((dive->duration.seconds) / 60)) + QString::fromUtf8(" min");
+ m_duration = get_dive_duration_string(dive->duration.seconds, QObject::tr("h:"), QObject::tr("min"));
}
void Dive::put_buddy()
--
1.7.11.msysgit.0
More information about the subsurface
mailing list