Commit e47dc21a authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix laptop screen being off when opening the lid

filePath() returns the full path to the config file. readFile() then prepends configsDirPath() to the path, leading to a garbled file path and making it impossible to load the right file. We should instead just pass id() + _lidOpen to readFile.

BUG: 371447

Test Plan:
Connected a monitor to my laptop. Closed and reopened the lid.
Laptop screen was off. Needed turning on in the KCM.
Laptop screen is on.

Both X11 and Wayland

Reviewers: #plasma, romangg

Reviewed By: #plasma, romangg

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 987f8210
......@@ -85,9 +85,9 @@ std::unique_ptr<Config> Config::readFile()
std::unique_ptr<Config> Config::readOpenLidFile()
const QString openLidFilePath = filePath() % QStringLiteral("_lidOpened");
auto config = readFile(openLidFilePath);
const QString openLidFile = id() % QStringLiteral("_lidOpened");
auto config = readFile(openLidFile);
QFile::remove(configsDirPath() % openLidFile);
return config;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment