Bug 421515 - Wrong time restored from session
Summary: Wrong time restored from session
Status: RESOLVED FIXED
Alias: None
Product: kronometer
Classification: Applications
Component: general (show other bugs)
Version: 2.2.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-14 14:48 UTC by Nico Dorn
Modified: 2021-01-05 22:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Dorn 2020-05-14 14:48:29 UTC
SUMMARY
Times stored in a session (File > Save as) cannot be restored correctly when the stopwatch has been paused several times before.


STEPS TO REPRODUCE
1. Open Kronometer and start the stopwatch (hit space).
2. Pause (hit space) after 5 seconds, save as session (Ctrl + Shift + S).
3. Resume (hit space), stop after 5 seconds. Now the clock shows 10 seconds, save it (Ctrl + S).
4. Resume, stop after 5 seconds again. Now the clock show 15 seconds, save it (Ctrl + S).
5. Quit Kronometer.
6. Reopen Kronometer, open the saved session (Strg + O), the time shown is 10 seconds but it should be 15.

Using the stopwatch in real life can result in huge differences (several hours). Seems as if times after pauses are being ignored, at least sometimes.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.18
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.3.0-51-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-2670QM CPU @ 2.20GHz
Memory: 7,7 GiB of RAM
Comment 1 Bug Janitor Service 2020-12-20 21:26:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kronometer/-/merge_requests/2
Comment 2 Elvis Angelaccio 2021-01-05 22:00:56 UTC
Git commit 22b677ba707030951b50600ca8361a9a71d98eed by Elvis Angelaccio, on behalf of Johnny Jazeix.
Committed on 05/01/2021 at 21:51.
Pushed by elvisangelaccio into branch 'master'.

Fix saving not working after first time.

M  +2    -2    src/models/sessionmodel.cpp
M  +2    -2    src/models/sessionmodel.h

https://invent.kde.org/utilities/kronometer/commit/22b677ba707030951b50600ca8361a9a71d98eed