wok diff liblxqt/stuff/poweroff+reboot.diff @ rev 20750
updated bluefish (2.2.0 -> 2.2.10)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Feb 11 17:14:38 2019 +0100 (2019-02-11) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/liblxqt/stuff/poweroff+reboot.diff Mon Feb 11 17:14:38 2019 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +--- lxqtpower/lxqtpowerproviders.cpp 1.5 ++++ lxqtpower/lxqtpowerproviders.cpp 1.6 +@@ -497,2 +497,10 @@ 1.7 + PowerProvider::DontCheckDBUS); 1.8 ++ case Power::PowerReboot: 1.9 ++ return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE, 1.10 ++ QDBusConnection::sessionBus(), "canReboot", 1.11 ++ PowerProvider::DontCheckDBUS); 1.12 ++ case Power::PowerShutdown: 1.13 ++ return dbusCall(LXQT_SERVICE, LXQT_PATH, LXQT_SERVICE, 1.14 ++ QDBusConnection::sessionBus(), "canPoweroff", 1.15 ++ PowerProvider::DontCheckDBUS); 1.16 + default: 1.17 +@@ -511,8 +519,2 @@ 1.18 + command = "logout"; 1.19 +- break; 1.20 +- 1.21 +- default: 1.22 +- return false; 1.23 +- } 1.24 +- 1.25 + return dbusCall(LXQT_SERVICE, 1.26 +@@ -523,2 +525,14 @@ 1.27 + ); 1.28 ++ break; 1.29 ++ case Power::PowerReboot: 1.30 ++ return QProcess::startDetached("reboot || reboot -f"); 1.31 ++ break; 1.32 ++ case Power::PowerShutdown: 1.33 ++ return QProcess::startDetached("poweroff"); 1.34 ++ break; 1.35 ++ 1.36 ++ default: 1.37 ++ return false; 1.38 ++ } 1.39 ++ 1.40 + }