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) {