Commit 747f684f authored by Gleb Popov's avatar Gleb Popov 💬
Browse files

On FreeBSD do not try to execute powerdevil.backlighthelper.syspath action.

FreeBSD doesn't have sysfs, but it also isn't needed for backlight controls.

(cherry picked from commit 09533c73)
parent 66d6d5e1
......@@ -175,6 +175,12 @@ void PowerDevilUPowerBackend::init()
m_brightnessMax = brightnessMaxJob->data()["brightnessmax"].toInt();
}
#ifdef Q_OS_FREEBSD
// FreeBSD doesn't have the sysfs interface that the bits below expect;
// the sysfs calls always fail, leading to brightnessSupportQueried(false) emission.
// Skip that command and carry on with the information that we do have.
Q_EMIT brightnessSupportQueried(m_brightnessMax > 0);
#else
KAuth::Action syspathAction("org.kde.powerdevil.backlighthelper.syspath");
syspathAction.setHelperId(HELPER_ID);
KAuth::ExecuteJob* syspathJob = syspathAction.execute();
......@@ -199,6 +205,7 @@ void PowerDevilUPowerBackend::init()
}
);
syspathJob->start();
#endif
}
);
brightnessMaxJob->start();
......
Markdown is supported
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