Bug 481883 - Stopwatch Lap function displays lap times in decimal seconds, rather than MM:SS.ss
Summary: Stopwatch Lap function displays lap times in decimal seconds, rather than MM:...
Status: RESOLVED FIXED
Alias: None
Product: KClock
Classification: Applications
Component: General (show other bugs)
Version: 23.08.4
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Devin Lin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-27 06:41 UTC by Kerne Fahey
Modified: 2024-03-02 05:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kerne Fahey 2024-02-27 06:41:24 UTC
SUMMARY
When using the Stopwatch function of kclock, if the lap button is pressed, the lap time record is displayed in decimal seconds. For example, a 15 minute lap displays as `+900.00`. This is not very readable. The times should be in MM:SS.ss format as is used in the main stopwatch time display.

STEPS TO REPRODUCE
1. Select Stopwatch pane
2. Click Start button
3. Wait more than 60 seconds
4. Click Lap button

OBSERVED RESULT
The lap time is displayed as a decimal seconds value.

EXPECTED RESULT
The lap time should be displayed in MM:SS.ss format as in the main stopwatch display.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Linux madeline 6.5.0-17-generic #17-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 11 14:01:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
(available in About System)
KDE Plasma Version: app installed as a flatpak, so, the one that the kclock v.23.08.4 flatpak was built against (could not discern)
KDE Frameworks Version: ditto the above
Qt Version: ditto the above

ADDITIONAL INFORMATION
App installed as a flatpak from https://flathub.org/apps/org.kde.kclock on 26 February 2024.
Comment 1 Devin Lin 2024-03-02 05:31:32 UTC
Git commit 56c7e30bec4901e28364cbbbbaeeeacc9e9a9013 by Devin Lin.
Committed on 02/03/2024 at 05:27.
Pushed by devinlin into branch 'master'.

stopwatch: Refactor and move laps model to C++, improve UI

This commit:
- cleans up the stopwatch page, and moves the laps model to C++
- properly formats lap durations with hh:mm:ss.00
- adds flags to show which lap is the fastest and which is the slowest
- adds a lap duration label under the stopwatch time to show how long the current lap is
- adds table headers for the laps

M  +2    -0    src/kclock/CMakeLists.txt
M  +7    -4    src/kclock/main.cpp
M  +168  -88   src/kclock/qml/stopwatch/StopwatchPage.qml
A  +130  -0    src/kclock/stopwatchmodel.cpp     [License: GPL(v2.0+)]
A  +56   -0    src/kclock/stopwatchmodel.h     [License: GPL(v2.0+)]
M  +72   -54   src/kclock/stopwatchtimer.cpp
M  +32   -22   src/kclock/stopwatchtimer.h
M  +28   -6    src/kclock/utilmodel.cpp
M  +10   -6    src/kclock/utilmodel.h

https://invent.kde.org/utilities/kclock/-/commit/56c7e30bec4901e28364cbbbbaeeeacc9e9a9013