diff options
author | Iain Lane <iain.lane@canonical.com> | 2013-04-22 10:56:31 +0100 |
---|---|---|
committer | Iain Lane <iain.lane@canonical.com> | 2013-04-22 10:56:31 +0100 |
commit | aa7bb7bcd3577e291a34c99c2128c9107f596dc2 (patch) | |
tree | c69745ec6c2898ac37fa7b8b11da73e5c241a3dd /liblightdm-qt | |
parent | d9cab869b6fb66632b068a4a5127768ee53ae4b7 (diff) | |
download | lightdm-git-aa7bb7bcd3577e291a34c99c2128c9107f596dc2.tar.gz |
Call correct DBus methods for hibernate in liblightdm-qt
Diffstat (limited to 'liblightdm-qt')
-rw-r--r-- | liblightdm-qt/power.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/liblightdm-qt/power.cpp b/liblightdm-qt/power.cpp index 245e15c7..eb0c82cd 100644 --- a/liblightdm-qt/power.cpp +++ b/liblightdm-qt/power.cpp @@ -75,9 +75,9 @@ bool PowerInterface::suspend() { QDBusReply<void> reply; if (d->login1Interface->isValid()) - reply = d->login1Interface->call("Hibernate", false); + reply = d->login1Interface->call("Suspend", false); else - reply = d->powerManagementInterface->call("Hibernate"); + reply = d->powerManagementInterface->call("Suspend"); return reply.isValid (); } @@ -86,11 +86,11 @@ bool PowerInterface::canHibernate() { if (d->login1Interface->isValid()) { - QDBusReply<QString> reply = d->login1Interface->call("CanHibernate"); - if (reply.isValid()) - { - return reply.value() == "yes"; - } + QDBusReply<QString> reply = d->login1Interface->call("CanHibernate"); + if (reply.isValid()) + { + return reply.value() == "yes"; + } } qWarning() << d->login1Interface->lastError(); @@ -108,9 +108,9 @@ bool PowerInterface::hibernate() { QDBusReply<void> reply; if (d->login1Interface->isValid()) - reply = d->login1Interface->call("Hibernate", false); + reply = d->login1Interface->call("Hibernate", false); else - reply = d->powerManagementInterface->call("Hibernate"); + reply = d->powerManagementInterface->call("Hibernate"); return reply.isValid (); } |