summaryrefslogtreecommitdiff
path: root/liblightdm-qt
diff options
context:
space:
mode:
authorFaheem Pervez <>2011-09-22 13:59:06 +1000
committerRobert Ancell <robert.ancell@canonical.com>2011-09-22 13:59:06 +1000
commit44b773228cd6a23d93fcd60d9c81170a0b8d83fd (patch)
treeb412bbdb51d674957b57311ccb81bda8a81d7768 /liblightdm-qt
parent658561cb603b5accde340725f6013e3a79e4f237 (diff)
downloadlightdm-44b773228cd6a23d93fcd60d9c81170a0b8d83fd.tar.gz
Use correct D-Bus and power interface in liblightdm-qt
Diffstat (limited to 'liblightdm-qt')
-rw-r--r--liblightdm-qt/power.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/liblightdm-qt/power.cpp b/liblightdm-qt/power.cpp
index 57f9fa38..8656c247 100644
--- a/liblightdm-qt/power.cpp
+++ b/liblightdm-qt/power.cpp
@@ -26,14 +26,14 @@ static QDBusInterface* consoleKitInterface = NULL;
static bool setupPowerManagementInterface ()
{
if (!powerManagementInterface)
- powerManagementInterface = new QDBusInterface("org.freedesktop.PowerManagement","/org/freedesktop/PowerManagement", "org.freedesktop.PowerManagement");
+ powerManagementInterface = new QDBusInterface("org.freedesktop.UPower","/org/freedesktop/UPower", "org.freedesktop.UPower", QDBusConnection::systemBus());
return powerManagementInterface != NULL;
}
static bool setupConsoleKitInterface ()
{
if (!consoleKitInterface)
- consoleKitInterface = new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit");
+ consoleKitInterface = new QDBusInterface("org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", QDBusConnection::systemBus());
return consoleKitInterface != NULL;
}
@@ -42,7 +42,7 @@ bool QLightDM::canSuspend()
if (!setupPowerManagementInterface())
return false;
- QDBusReply<bool> reply = powerManagementInterface->call("CanSuspend");
+ QDBusReply<bool> reply = powerManagementInterface->call("SuspendAllowed");
if (reply.isValid())
return reply.value();
else
@@ -60,7 +60,7 @@ bool QLightDM::canHibernate()
if (!setupPowerManagementInterface())
return false;
- QDBusReply<bool> reply = powerManagementInterface->call("CanHibernate");
+ QDBusReply<bool> reply = powerManagementInterface->call("HibernateAllowed");
if (reply.isValid())
return reply.value();
else
@@ -88,7 +88,7 @@ bool QLightDM::canShutdown()
void QLightDM::shutdown()
{
if (setupConsoleKitInterface())
- consoleKitInterface->call("stop");
+ consoleKitInterface->call("Stop");
}
bool QLightDM::canRestart()