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>
pull/1/head
Michele Calgaro 9 years ago
parent 92394e2850
commit c7171b93f4

@ -834,12 +834,14 @@ bool TDERootSystemDevice::setPowerState(TDESystemPowerState::TDESystemPowerState
} }
} }
else if (ps == TDESystemPowerState::HybridSuspend) { else if (ps == TDESystemPowerState::HybridSuspend) {
TQT_DBusMessage msg = TQT_DBusMessage::methodCall( TQT_DBusProxy halPowerManagement(
"org.freedesktop.Hal", "org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer", "/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement", "org.freedesktop.Hal.Device.SystemPowerManagement",
"SuspendHybrid"); dbusConn);
TQT_DBusMessage reply = dbusConn.sendWithReply(msg); TQValueList<TQT_DBusData> params;
params << TQT_DBusData::fromInt32(0);
TQT_DBusMessage reply = halPowerManagement.sendWithReply("SuspendHybrid", params);
if (reply.type() == TQT_DBusMessage::ReplyMessage) { if (reply.type() == TQT_DBusMessage::ReplyMessage) {
return true; return true;
} }

Loading…
Cancel
Save