| Summary: | Suspend session actions are shown as unsupported on first open | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Natalie Clarius <natalie_clarius> |
| Component: | kcm_powerdevil | Assignee: | Jakob Petsovits <jpetso> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jpetso, kde, natalie_clarius |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=482668 | ||
| Latest Commit: | https://invent.kde.org/plasma/powerdevil/-/commit/78415ae0097ad36377b407d3b143589ca8fa8a18 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Natalie Clarius
2024-03-16 12:06:25 UTC
A relevant merge request is waiting for review @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/339 Git commit 78415ae0097ad36377b407d3b143589ca8fa8a18 by Jakob Petsovits.
Committed on 16/03/2024 at 15:33.
Pushed by jpetso into branch 'master'.
kcmodule: Revert to binding currentIndex in Component.onCompleted
Commit 8ecf6430 ("Don't crash when a configured button action
is unsupported") caused empty ComboBox selections on initial load.
Turns out `indexOfValue()` can only be used after the
Component.completed() signal is emitted, so a purely declarative
binding worked incorrectly if queried too early by QML.
Therefore, we revert back to assigning a Qt.binding() to
currentIndex in Component.onCompleted.
This commit also adapts PowerProfileModel and its associated
ComboBox in a similar way as the other two models used in this KCM.
Related: bug 482668
M +1 -1 kcmodule/common/PowerProfileModel.cpp
M +4 -1 kcmodule/profiles/ui/GlobalConfig.qml
M +20 -11 kcmodule/profiles/ui/ProfileConfig.qml
https://invent.kde.org/plasma/powerdevil/-/commit/78415ae0097ad36377b407d3b143589ca8fa8a18
|