Repository navigation
Stop the power panel closing itself inside its opened handler - #15319
Merged
Merged
Conversation
On a machine without a battery, opening the power panel ran onOpenedChanged, which called close() synchronously: writing the very property whose change was being notified, which QML reports as a binding loop for Panel.opened on every attempt. Defer the close with Qt.callLater; the panel still never shows without a battery (its button is hidden and KeyboardPanel gates on batteryPresent), it just stops looping to say so. Add a runtime-smoke log check for the opened loop.
Contributor
|
The smoke check only reaches the deferred close where no battery exists. This fixture runs the real power panel against a dead system bus (no UPower display device), opens it, and requires it to settle closed with no binding loop, laptops included. Mutation-checked: restoring the synchronous close fails it.
Contributor
Author
|
Greptile addressed: new |
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.
What
Found by the §3 shell log sweep (it was the third binding loop in the smoke log, after the two named in the plan). On a machine without a battery, opening the power panel ran
onOpenedChanged, which calledclose()synchronously — writing the very property whose change was being notified. QML reports it on every attempt:The power panel is the only panel that closes inside its own opened handler. This defers that close with
Qt.callLater; behaviour is unchanged (the button is hidden without a battery and the panel surface already gates onbatteryPresent), minus the loop. Adds a runtime-smoke log check scoped to theopenedloop — it sits next to #15298's FileView check and the two combine to no-binding-loops once both land.Verification
ok - panel opens have no binding loop for opened; the only remaining failures in that run are the separate faults from Fix runtime-smoke bar put by putting a widget the default bar lacks #15297/Load platform FileViews without binding loops #15298.From plans/overnight-quality.md §3 (shell log sweep).