From a29712773b22aee0b5fefb3cc4b87499baa8db01 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 26 Apr 2016 20:11:50 +1000 Subject: tdecore: complete previous commit, one file was forgotten by mistake. Signed-off-by: Michele Calgaro --- tdecore/tdehw/tderootsystemdevice.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'tdecore') 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) { -- cgit v1.2.3