Fix disabeling of autolock timeout
ClosedPublic

Authored by alex on Jan 31 2020, 12:57 PM.

Details

Summary

When the "Lock Screen:" checkbox gets disabled the timeout spin box gets disabled too.
But the spin box is still enabled when the checkbox is disabled if the module is loaded.

Test Plan

Diff Detail

Repository
R133 KScreenLocker
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
alex created this revision.Jan 31 2020, 12:57 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 31 2020, 12:57 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
alex requested review of this revision.Jan 31 2020, 12:57 PM
ervin added a comment.Jan 31 2020, 1:05 PM

Looks like it's caused by the initial state of the ui file being "wrong" (checkbox unchecked and spinbox enabled), what about simply having the spinbox disabled in the ui file? Maybe we miss a connect there too. It's the kind of ui specific details I try to push out of the C++ file.

alex updated this revision to Diff 74787.Jan 31 2020, 2:53 PM

Set spinbox disabled by default

alex added a comment.Jan 31 2020, 2:57 PM

Thats a good point, the issue is that the validation slot gets only triggered if the value gets changed.
If the automatic locking is disabled the value does not change and no signal gets triggered.

Setting the spin box disabled by default is then the easiest solution :-)

ervin accepted this revision.Feb 12 2020, 1:04 PM
This revision is now accepted and ready to land.Feb 12 2020, 1:04 PM
ervin added a comment.Mar 18 2020, 4:59 PM

Well, I already accepted it, I thought you pushed long ago (and I suspect it got overlooked by the other potential reviewers). :-)

alex added a comment.Mar 18 2020, 5:13 PM

I don't have a developer account, but I am going to apply for one.
May I enter your name as a supporter?

ervin added a comment.Mar 18 2020, 5:16 PM

Ah didn't know! I assumed you could push... But yeah, you authored a few patches now, time to apply for a developer account. You can put my name indeed.

This revision was automatically updated to reflect the committed changes.