summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-05-04 12:56:55 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-05-04 12:56:55 +1000
commitc7171b93f4fd2b735aa9627f88e95066da34276b (patch)
tree0a5e5772f9d595e88906d86cffad4f2e869b3060 /tdecore
parent92394e2850e50efa0f3334ef3526421befe33072 (diff)
downloadtdelibs-c7171b93f4fd2b735aa9627f88e95066da34276b.tar.gz
tdelibs-c7171b93f4fd2b735aa9627f88e95066da34276b.zip
tdecore: Fixed hybrid suspend (aka suspend to RAM + suspend to disk) support using HAL.
org.freedesktop.Hal.Device.SystemPowerManagement/SuspendHybrid requires a parameter when invoked. This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tderootsystemdevice.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/tdecore/tdehw/tderootsystemdevice.cpp b/tdecore/tdehw/tderootsystemdevice.cpp
index 37154126f..b9a0bef9c 100644
--- a/tdecore/tdehw/tderootsystemdevice.cpp
+++ b/tdecore/tdehw/tderootsystemdevice.cpp
@@ -834,12 +834,14 @@ bool TDERootSystemDevice::setPowerState(TDESystemPowerState::TDESystemPowerState
}
}
else if (ps == TDESystemPowerState::HybridSuspend) {
- TQT_DBusMessage msg = TQT_DBusMessage::methodCall(
- "org.freedesktop.Hal",
- "/org/freedesktop/Hal/devices/computer",
- "org.freedesktop.Hal.Device.SystemPowerManagement",
- "SuspendHybrid");
- TQT_DBusMessage reply = dbusConn.sendWithReply(msg);
+ TQT_DBusProxy halPowerManagement(
+ "org.freedesktop.Hal",
+ "/org/freedesktop/Hal/devices/computer",
+ "org.freedesktop.Hal.Device.SystemPowerManagement",
+ dbusConn);
+ TQValueList<TQT_DBusData> params;
+ params << TQT_DBusData::fromInt32(0);
+ TQT_DBusMessage reply = halPowerManagement.sendWithReply("SuspendHybrid", params);
if (reply.type() == TQT_DBusMessage::ReplyMessage) {
return true;
}