summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-04-26 20:11:50 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-04-26 20:11:50 +1000
commita29712773b22aee0b5fefb3cc4b87499baa8db01 (patch)
treec29736f2a09f66e8df66a776f8ed6f16ea5b5c16 /tdecore
parentba3ed714c6ef94db907740a44dd75bdd701d3ff3 (diff)
downloadtdelibs-a29712773b22aee0b5fefb3cc4b87499baa8db01.tar.gz
tdelibs-a29712773b22aee0b5fefb3cc4b87499baa8db01.zip
tdecore: complete previous commit, one file was forgotten by mistake.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tderootsystemdevice.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/tdecore/tdehw/tderootsystemdevice.cpp b/tdecore/tdehw/tderootsystemdevice.cpp
index 90e0156d2..7ced4a279 100644
--- a/tdecore/tdehw/tderootsystemdevice.cpp
+++ b/tdecore/tdehw/tderootsystemdevice.cpp
@@ -599,18 +599,21 @@ void TDERootSystemDevice::setHibernationMethod(TDESystemHibernationMethod::TDESy
if (hm == TDESystemHibernationMethod::Platform) {
hibernationCommand = "platform";
}
- if (hm == TDESystemHibernationMethod::Shutdown) {
+ else if (hm == TDESystemHibernationMethod::Shutdown) {
hibernationCommand = "shutdown";
}
- if (hm == TDESystemHibernationMethod::Reboot) {
+ else if (hm == TDESystemHibernationMethod::Reboot) {
hibernationCommand = "reboot";
}
- if (hm == TDESystemHibernationMethod::TestProc) {
+ else if (hm == TDESystemHibernationMethod::TestProc) {
hibernationCommand = "testproc";
}
- if (hm == TDESystemHibernationMethod::Test) {
+ else if (hm == TDESystemHibernationMethod::Test) {
hibernationCommand = "test";
}
+ else if (hm == TDESystemHibernationMethod::Suspend) {
+ hibernationCommand = "suspend";
+ }
TQTextStream stream( &file );
stream << hibernationCommand;
file.close();
@@ -629,18 +632,21 @@ void TDERootSystemDevice::setHibernationMethod(TDESystemHibernationMethod::TDESy
if (hm == TDESystemHibernationMethod::Platform) {
hibernationCommand = "platform";
}
- if (hm == TDESystemHibernationMethod::Shutdown) {
+ else if (hm == TDESystemHibernationMethod::Shutdown) {
hibernationCommand = "shutdown";
}
- if (hm == TDESystemHibernationMethod::Reboot) {
+ else if (hm == TDESystemHibernationMethod::Reboot) {
hibernationCommand = "reboot";
}
- if (hm == TDESystemHibernationMethod::TestProc) {
+ else if (hm == TDESystemHibernationMethod::TestProc) {
hibernationCommand = "testproc";
}
- if (hm == TDESystemHibernationMethod::Test) {
+ else if (hm == TDESystemHibernationMethod::Test) {
hibernationCommand = "test";
}
+ else if (hm == TDESystemHibernationMethod::Suspend) {
+ hibernationCommand = "suspend";
+ }
params << TQT_DBusData::fromString(hibernationCommand);
TQT_DBusMessage reply = hardwareControl.sendWithReply("SetHibernationMethod", params);
if (reply.type() == TQT_DBusMessage::ReplyMessage) {