From 29cf3d4e8dce3023c58af21800f297dbadde6063 Mon Sep 17 00:00:00 2001 From: Christian Aigner Date: Thu, 21 Aug 2025 17:08:31 +0200 Subject: [PATCH] [FIX] increase time format to two decimals I found it odd that 1 hour 15 minutes would display as 1.3 hours. I wanted it to display 1.25 hours. So I changed the number of decimals. --- src/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/session.cpp b/src/session.cpp index 4f41b4b..ba88463 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -41,12 +41,12 @@ QString Session::total(Time time, bool decimals, bool unit) const if (decimals) { double hours = d->m_totals[time] / 3600.0; if (!unit) { - result = QLocale().toString(hours, 'f', 1); + result = QLocale().toString(hours, 'f', 2); } else { if (hours == std::floor(hours)) { result = tr("%n hour(s)", "", hours); } else { - result = tr("%L1 hours").arg(hours, 0, 'f', 1); + result = tr("%L1 hours").arg(hours, 0, 'f', 2); } } } else {