Details
-
Sub-task
-
Resolution: Fixed
-
P1: Critical
-
None
-
c1962e919 (dev), cc1ae010d (6.7)
Description
The bug exists in DistanceTimeLayer.qml, and the following lines:
92: duration_ = (duration_ / 1000).toFixed(0); 93: const dh = (duration_ / 3600).toFixed(0); 94: const dm = ((duration_ % 3600) / 60).toFixed(0); 95: const ds = duration_ % 60;
In the line 94 when `(duration % 3600)`{} is more that {}30, then _dm is 1 and the text of time duration is 1m ago instead of for example 31s ago.
Solution: Instead of `.toFixed(0)` method `Math.floor(...)` should be used (also for dh and ds).
Attachments
For Gerrit Dashboard: QTBUG-121011 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
530832,2 | Lightning Viewer Example: Use chrono for Time Duration + Fix Bug | dev | qt/qtdoc | Status: MERGED | +2 | 0 |
531019,2 | Lightning Viewer Example: Use chrono for Time Duration + Fix Bug | 6.7 | qt/qtdoc | Status: MERGED | +2 | 0 |