STEPS TO REPRODUCE 1. Open power management KCM 3. Switch to battery tab and back to AC tab again OBSERVED RESULT 2. "The action you had previously configured for after a period of inactivity is now unsupported on your system. Please select a different one." for inactivity, power button and lid close in AC profile tab 4. Options are correctly displayed again EXPECTED RESULT Options for AC profile are correctly loaded on first open SOFTWARE/OS VERSIONS git master
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