diff options
Diffstat (limited to 'tdecore/tdehw/tdecpudevice.cpp')
-rw-r--r-- | tdecore/tdehw/tdecpudevice.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/tdecore/tdehw/tdecpudevice.cpp b/tdecore/tdehw/tdecpudevice.cpp index 40b9ad6e2..6715000a0 100644 --- a/tdecore/tdehw/tdecpudevice.cpp +++ b/tdecore/tdehw/tdecpudevice.cpp @@ -30,13 +30,13 @@ #include "config.h" // uPower -#if defined(WITH_TDEHWLIB_DAEMONS) || defined(WITH_HAL) +#if defined(WITH_TDEHWLIB_DAEMONS) #include <tqdbusdata.h> #include <tqdbusmessage.h> #include <tqdbusproxy.h> #include <tqdbusvariant.h> #include <tqdbusconnection.h> -#endif // defined(WITH_TDEHWLIB_DAEMONS) || defined(WITH_HAL) +#endif TDECPUDevice::TDECPUDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn) : TDEGenericDevice(dt, dn) { @@ -151,23 +151,6 @@ bool TDECPUDevice::canSetGovernor() { } #endif // WITH_TDEHWLIB_DAEMONS -#ifdef WITH_HAL - { - TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); - if (dbusConn.isConnected()) { - TQT_DBusMessage msg = TQT_DBusMessage::methodCall( - "org.freedesktop.Hal", - "/org/freedesktop/Hal/devices/computer", - "org.freedesktop.Hal.Device.CPUFreq", - "GetCPUFreqGovernor"); - TQT_DBusMessage reply = dbusConn.sendWithReply(msg); - if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) { - return true; - } - } - } -#endif // WITH_HAL - return false; } @@ -201,24 +184,6 @@ void TDECPUDevice::setGovernor(TQString gv) { } #endif // WITH_TDEHWLIB_DAEMONS -#ifdef WITH_HAL - if ( !setGovernorDone ) { - TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); - if (dbusConn.isConnected()) { - TQT_DBusProxy cpuFreqControl("org.freedesktop.Hal", "/org/freedesktop/Hal/devices/computer", "org.freedesktop.Hal.Device.CPUFreq", dbusConn); - if (cpuFreqControl.canSend()) { - // set CPU governor - TQValueList<TQT_DBusData> params; - params << TQT_DBusData::fromString(gv.lower()); - TQT_DBusMessage reply = cpuFreqControl.sendWithReply("SetCPUFreqGovernor", params); - if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) { - setGovernorDone = true; - } - } - } - } -#endif // WITH_HAL - // Force update of the device information object if ( setGovernorDone ) { TDEGlobal::hardwareDevices()->processModifiedCPUs(); |