From cfb8aac910ef6b556342138066d4446fe217e0c7 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 25 Feb 2024 12:41:27 +0300 Subject: [PATCH] UI: Statistics: Traffic: Tweak time formats --- src/ui/model/traflistmodel.cpp | 4 ++-- src/ui/util/dateutil.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/model/traflistmodel.cpp b/src/ui/model/traflistmodel.cpp index d58d2ef5..c71cd5dd 100644 --- a/src/ui/model/traflistmodel.cpp +++ b/src/ui/model/traflistmodel.cpp @@ -220,14 +220,14 @@ QString TrafListModel::formatTrafTime(qint32 trafTime) const const qint64 unixTime = DateUtil::toUnixTime(trafTime); switch (m_type) { - case TrafTotal: - Q_FALLTHROUGH(); case TrafHourly: return DateUtil::formatHour(unixTime); case TrafDaily: return DateUtil::formatDay(unixTime); case TrafMonthly: return DateUtil::formatMonth(unixTime); + case TrafTotal: + return DateUtil::formatHour(unixTime); } return QString(); } diff --git a/src/ui/util/dateutil.cpp b/src/ui/util/dateutil.cpp index b6b2615d..c9db0ec3 100644 --- a/src/ui/util/dateutil.cpp +++ b/src/ui/util/dateutil.cpp @@ -67,12 +67,12 @@ QString DateUtil::formatHour(qint64 unixTime) QString DateUtil::formatDay(qint64 unixTime) { - return formatDateTime(unixTime, "dd MMMM yyyy"); + return formatDateTime(unixTime, "dd-MMM-yyyy"); } QString DateUtil::formatMonth(qint64 unixTime) { - return formatDateTime(unixTime, "MMMM yyyy"); + return formatDateTime(unixTime, "MMM-yyyy"); } QString DateUtil::formatDateTime(qint64 unixTime, const QString &format)