Persist Teruglevering overlay toggle + fix timer memory leak#27
Open
grmt wants to merge 2 commits into
Open
Conversation
The showSpecialBar2 flag on the today graph was hardcoded to false, so the Teruglevering overlay was never shown and the user's choice was lost on every navigation. - SolarPanelApp: add showProduction property - SolarGeneralProc: load/save showProduction in getSettings/saveSettings - SolarPanelScreen: bind showSpecialBar2 to app.showProduction; replace static Teruglevering legend with a SolarPowerCheckbox that toggles the overlay and saves the setting immediately on change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signal.connect(cb) was called on every invocation of solarDelay(), zonneplanDelay(), zonneplanRegisterDelay(), and solarEnphaseDelay() without a matching disconnect(). Qt never removes slots automatically, so each call added another connection: after N calls the timer fired N callbacks and kept N closures alive indefinitely. Replace with a stored-callback pattern: the callback is held in a property on the Timer, cleared in onTriggered before being called, and the timer is stopped before each restart so a pending fire cannot race with the new callback. The *DelayStop() functions also null the callback so the closure is released immediately when a timer is cancelled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
oef, da's een beetje voortvarend van Claude, ik moet het nog testen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showSpecialBar2) on the today graph was hardcoded tofalse, so the user's choice was lost on every navigation. Replaced the static green legend square with aSolarPowerCheckboxthat controls the overlay live and saves the state tosolarpanel_userSettings.jsonvia the existingsaveSettings()/getSettings()mechanism.solarDelay,zonneplanDelay,zonneplanRegisterDelay,solarEnphaseDelay) calledSignal.connect(cb)on every invocation without a matchingdisconnect(). Qt never removes slots automatically, so connections accumulated indefinitely — each closure staying alive forever and the callback firing multiple times per trigger. Replaced with a stored-callback property pattern that avoids signal accumulation entirely.Test plan
🤖 Generated with Claude Code