Bug 496607

Summary: In Timer, adding 1 minute while running does not cancel earlier timeout
Product: [Applications] KClock Reporter: Oliver Geer <hi>
Component: GeneralAssignee: Devin Lin <espidev>
Status: RESOLVED FIXED    
Severity: normal CC: hanyoung, john.kizer, kde
Priority: NOR    
Version First Reported In: 24.08.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Oliver Geer 2024-11-23 13:21:26 UTC
SUMMARY

In the Timer, clicking on the "Add 1 minute" button to a timer currently running that is n seconds long so it becomes (n+60) seconds long will make the timer still end n seconds after it started rather than (n+60) seconds after.

STEPS TO REPRODUCE
1. Open KClock.
2. Click Timers.
3. Create a timer with a short duration (so you can test) and click on it.
4. Click Start in the top bar.
5. Before the timer finishes, click "+1 minute".
6. Wait for the timer to have 1 minute left.

OBSERVED RESULT

The timer ends with 1 minute left, and gives a "Timer has finished" notification and in-app alert.

EXPECTED RESULT

The timer should continue until there is 0 time remaining.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i3 CPU M 370 @ 2.40GHz
Memory: 3.7 GiB of RAM
Graphics Processor: AMD CEDAR

ADDITIONAL INFORMATION
Pausing the timer before it reaches 1 minute after the last step to reproduce, then starting it again will cause the expected result and "fix" the bug. This suggests that the cancellation of the previous timer that occurs when the timer is paused should also happen for the old timer (but not the new one) when "+1 minute" is clicked.
Comment 1 John Kizer 2024-11-26 19:35:40 UTC
I can confirm on the same KClock version, Fedora 41