Bug 471153 - Night Color KCM resets "switching times" to "Always Off" on open
Summary: Night Color KCM resets "switching times" to "Always Off" on open
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_nightcolor (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 476927 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-06-17 13:16 UTC by Patrick Silva
Modified: 2023-11-22 18:57 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-06-17 13:16:07 UTC
STEPS TO REPRODUCE
1. open Night Color KCM
2. close System Settings without changing anything
3. 

OBSERVED RESULT
the save/discard prompt shows up

EXPECTED RESULT
System Settings closes

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.1
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-06-21 04:49:20 UTC
Can confirm. The problem appears to be that the "Switching times" combobox gets reset at launch, changing its value and causing the KCM to enter a dirty state immediately.
Comment 2 Bharadwaj Raju 2023-06-23 11:41:59 UTC
Looks like the currentIndexChanged() on the combobox gets called too early
Comment 3 Bharadwaj Raju 2023-06-23 14:07:10 UTC
For some reason, this problem doesn't appear in kcmshell6. Only in systemsettings.

When running under systemsettings, the onActiveChanged connection on kcm.nightColorSettings never gets called, while it does happen under kcmshell6. I have no idea why (yet).
Comment 4 Bharadwaj Raju 2023-07-07 09:44:47 UTC
I have a hack solution for this, but I don't feel good about ignoring such a perplexing underlying problem. Do you think it's worth making an MR for the hack?
Comment 5 Nate Graham 2023-07-07 13:42:07 UTC
Depending on how difficult it would be to fix in a way you consider more correct, it might be worth submitting your hack patch as an RFC to stimulate discussion around the subject.
Comment 6 Bug Janitor Service 2023-07-07 14:08:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3050
Comment 7 Fushan Wen 2023-09-30 09:13:08 UTC
(In reply to Bharadwaj Raju from comment #3)
> For some reason, this problem doesn't appear in kcmshell6. Only in
> systemsettings.
> 
> When running under systemsettings, the onActiveChanged connection on
> kcm.nightColorSettings never gets called, while it does happen under
> kcmshell6. I have no idea why (yet).

This looks like https://invent.kde.org/plasma/systemsettings/-/merge_requests/258

The signal/slot is broken in systemsettings
Comment 8 Patrick Silva 2023-11-13 11:41:23 UTC
*** Bug 476927 has been marked as a duplicate of this bug. ***