[kded] correctly restore lidOpened configuration on startup
Summary:
When shutting down the machine (or kded5, really) with the lid closed
will leave a config with the laptop panel disabled, and also a config
with the same id, but _lidOpened appended. The latter is the config that
is restored when the lid is opened again. When the lid is opened while
kded wasn't running (shut down), the config with the panel disabled is
restored.
We do want to restore the _lidOpened config, so check if it exists, and
if it does, move it to the configId to have it restored.
This effectively avoids a disabled laptop panel after the laptop has
been shut down with an external monitor connected and the lid closed.
BUG:353029
Test Plan:
- added autotest for this case
- reproduced bug by killing kded with an external output connected and the laptop lid closed, after opening the lid, kded would correctly enable the laptop display on startup
Reviewers: Plasma, graesslin
Reviewed By: Plasma, graesslin
Subscribers: graesslin, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D2465