Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auto sleep setting bugs #225

Merged
merged 2 commits into from
Sep 28, 2021
Merged

Conversation

nhnt
Copy link
Contributor

@nhnt nhnt commented Sep 28, 2021

This fixes two bugs:

  • loadSettings indirectly calls saveSettings, breaking reset for the sleep settings.
  • The auto sleep setting is not saved unless the sleepAfter SpinBox is modified

Nick added 2 commits September 28, 2021 13:23
Clicking the reset button in SettingsPopup calls loadSettings, but
loadSettings calls setAutoStartApplication via setProperty, and
setAutoStartApplication calls saveSettings. This prevents the sleep
settings from resetting properly. I moved the saveSettings call to the
QML to fix this.
The value of sleepAfter needs to be updated when auto sleep is
enabled, otherwise it will remain zero and the checkbox setting will
not be saved.
@codeclimate
Copy link

codeclimate bot commented Sep 28, 2021

Code Climate has analyzed commit 30255cb and detected 0 issues on this pull request.

View more on Code Climate.

@Eeems
Copy link
Collaborator

Eeems commented Sep 28, 2021

It looks good, but I wont be able to do a test until later this evening.

@Eeems Eeems merged commit 127591c into Eeems-Org:master Sep 28, 2021
@Eeems Eeems added this to the v2.3 milestone Sep 28, 2021
@nhnt nhnt deleted the sleep_settings_bug branch September 28, 2021 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants