mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: check the reply of the org.freedesktop.ScreenSaver.Lock call in PowerManagementJob::start()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
83cb186aec
commit
de6f7c87f0
1 changed files with 5 additions and 2 deletions
|
@ -47,10 +47,13 @@ void PowerManagementJob::start()
|
|||
//kDebug() << "starting operation ... " << operation;
|
||||
|
||||
if (operation == "lockScreen") {
|
||||
#warning TODO: error check
|
||||
static const QString interface("org.freedesktop.ScreenSaver");
|
||||
QDBusInterface screensaver(interface, "/ScreenSaver");
|
||||
screensaver.asyncCall("Lock");
|
||||
QDBusPendingReply<void> reply = screensaver.asyncCall("Lock");
|
||||
if (reply.isError()) {
|
||||
setResult(false);
|
||||
return;
|
||||
}
|
||||
setResult(true);
|
||||
return;
|
||||
} else if (operation == "suspend" || operation == "suspendToRam") {
|
||||
|
|
Loading…
Add table
Reference in a new issue