Bug 481450 - The "Reset" and "Defaults" buttons does not work properly if either or both of the duration settings are set to custom
Summary: The "Reset" and "Defaults" buttons does not work properly if either or both o...
Status: RESOLVED FIXED
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: general (show other bugs)
Version: git-master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-17 08:54 UTC by Prajna Sariputra
Modified: 2024-02-26 21:30 UTC (History)
2 users (show)

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


Attachments
Recording demonstrating the bug (550.81 KB, video/mp4)
2024-02-17 08:54 UTC, Prajna Sariputra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Prajna Sariputra 2024-02-17 08:54:31 UTC
Created attachment 165881 [details]
Recording demonstrating the bug

SUMMARY
With the updated screen locker KCM since https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/175, if I set either of the duration options to a custom value, neither the Reset nor the Default buttons appear to work visually, the comboboxes will still show the custom value.

Fortunately this is just a visual bug, switching to another KCM and coming back makes the values appear as expected.


STEPS TO REPRODUCE
1. Open the screen locking KCM
2. Set either the "Lock screen automatically" or "Delay before password required" times to a custom value
3. Click Defaults or Reset

OBSERVED RESULT
The custom value entered does not appear to be reset properly.

EXPECTED RESULT
The custom value should be reset.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.1
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Bug Janitor Service 2024-02-21 18:39:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/205
Comment 2 Kristen McWilliam 2024-02-26 21:30:30 UTC
Git commit f1c250ed61fccd31b544007b5a50c96cb5bc1152 by Kristen McWilliam.
Committed on 26/02/2024 at 18:45.
Pushed by merritt into branch 'master'.

fix(kcm): reset and default actions not reflected immediately

Seems as if ComboBoxes have some difficulty with the reset and default
actions in KCMs. This patch adds listeners to the reset and default
actions and triggers an update of the ComboBoxes.

Took inspirations from the Powerdevil KCM, which was having similar
issues with ComboBoxes. See: https://invent.kde.org/plasma/powerdevil/-/blob/089a47aecc57c6e064e3bc459087ffd84495febc/kcmodule/profiles/ui/main.qml#L72

M  +2    -0    kcm/kcm.cpp
M  +11   -0    kcm/kcm.h
M  +30   -0    kcm/ui/main.qml

https://invent.kde.org/plasma/kscreenlocker/-/commit/f1c250ed61fccd31b544007b5a50c96cb5bc1152