From 78aee4e594a4a78883769dc1101a659133a8ada9 Mon Sep 17 00:00:00 2001 From: Tim Henning Date: Tue, 16 Jul 2019 15:34:02 +0200 Subject: [PATCH] Tracing: Add space between duration and time unit According to the SI convention, there is always a space between the number and the unit. I think we can leave it as is for the combination of multiple units for the sake of compactness. Change-Id: I11efc7ec4fc54a8adbf64e51817f2f8ad567bcea Reviewed-by: Ulf Hermann --- src/libs/tracing/timelineformattime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/tracing/timelineformattime.cpp b/src/libs/tracing/timelineformattime.cpp index 97344dfb5fa..314a68f236b 100644 --- a/src/libs/tracing/timelineformattime.cpp +++ b/src/libs/tracing/timelineformattime.cpp @@ -30,7 +30,7 @@ namespace Timeline { QString formatTime(qint64 timestamp, qint64 reference) { - static const char *decimalUnits[] = {"ns", "\xb5s", "ms", "s"}; + static const char *decimalUnits[] = {" ns", " \xb5s", " ms", " s"}; static const double second = 1e9; static const double minute = 60; static const double hour = 60; @@ -63,7 +63,7 @@ QString formatTime(qint64 timestamp, qint64 reference) double seconds = timestamp / second; if (seconds < minute) { - return QString::number(seconds, 'g', qMax(round, 3)) + "s"; + return QString::number(seconds, 'g', qMax(round, 3)) + " s"; } else { int minutes = seconds / minute; seconds -= minutes * minute;