wok annotate liblxqt/stuff/poweroff+reboot.diff @ rev 21184
get-xnviewmp: finetuning
author | Hans-G?nter Theisgen |
---|---|
date | Wed Apr 03 14:24:54 2019 +0100 (2019-04-03) |
parents | |
children |
rev | line source |
---|---|
psychomaniak@17258 | 1 --- lxqtpower/lxqtpowerproviders.cpp |
psychomaniak@17258 | 2 +++ lxqtpower/lxqtpowerproviders.cpp |
psychomaniak@17258 | 3 @@ -497,2 +497,10 @@ |
psychomaniak@17258 | 4 PowerProvider::DontCheckDBUS); |
psychomaniak@17258 | 5 + case Power::PowerReboot: |
psychomaniak@17258 | 6 + return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE, |
psychomaniak@17258 | 7 + QDBusConnection::sessionBus(), "canReboot", |
psychomaniak@17258 | 8 + PowerProvider::DontCheckDBUS); |
psychomaniak@17258 | 9 + case Power::PowerShutdown: |
psychomaniak@17258 | 10 + return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE, |
psychomaniak@17258 | 11 + QDBusConnection::sessionBus(), "canPoweroff", |
psychomaniak@17258 | 12 + PowerProvider::DontCheckDBUS); |
psychomaniak@17258 | 13 default: |
psychomaniak@17258 | 14 @@ -511,8 +519,2 @@ |
psychomaniak@17258 | 15 command = "logout"; |
psychomaniak@17258 | 16 - break; |
psychomaniak@17258 | 17 - |
psychomaniak@17258 | 18 - default: |
psychomaniak@17258 | 19 - return false; |
psychomaniak@17258 | 20 - } |
psychomaniak@17258 | 21 - |
psychomaniak@17258 | 22 return dbusCall(LXQT_SERVICE, |
psychomaniak@17258 | 23 @@ -523,2 +525,14 @@ |
psychomaniak@17258 | 24 ); |
psychomaniak@17258 | 25 + break; |
psychomaniak@17258 | 26 + case Power::PowerReboot: |
psychomaniak@17258 | 27 + return QProcess::startDetached("reboot || reboot -f"); |
psychomaniak@17258 | 28 + break; |
psychomaniak@17258 | 29 + case Power::PowerShutdown: |
psychomaniak@17258 | 30 + return QProcess::startDetached("poweroff"); |
psychomaniak@17258 | 31 + break; |
psychomaniak@17258 | 32 + |
psychomaniak@17258 | 33 + default: |
psychomaniak@17258 | 34 + return false; |
psychomaniak@17258 | 35 + } |
psychomaniak@17258 | 36 + |
psychomaniak@17258 | 37 } |