Expose whether we can lock the screen in the powermanagement data engine

This allows the lock logout applet and toolbox to access this information easily
since they already use this engine anyway
wilder-5.14
Kai Uwe Broulik 11 years ago
parent 7ba52e1fd6
commit 76d4a9b4b9
  1. 2
      dataengines/powermanagement/powermanagementengine.cpp

@ -29,6 +29,7 @@
#include <solid/powermanagement.h>
#include <klocalizedstring.h>
#include <KAuthorized>
#include <KIdleTime>
#include <QDebug>
@ -216,6 +217,7 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name)
setData("Sleep States", "Suspend", sleepstates.contains(Solid::PowerManagement::SuspendState));
setData("Sleep States", "Hibernate", sleepstates.contains(Solid::PowerManagement::HibernateState));
setData("Sleep States", "HybridSuspend", sleepstates.contains(Solid::PowerManagement::HybridSuspendState));
setData("Sleep States", "LockScreen", KAuthorized::authorizeKAction("lock_screen"));
} else if (name == "PowerDevil") {
QDBusMessage screenMsg = QDBusMessage::createMethodCall(SOLID_POWERMANAGEMENT_SERVICE,
QStringLiteral("/org/kde/Solid/PowerManagement/Actions/BrightnessControl"),

Loading…
Cancel
Save