diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | fe9b5d95c9a717fea16685ed7c175e1659d7127c (patch) | |
tree | d25f548cddafc13b0336fd1a900ce01a62c4c88c /src/hardware.cpp | |
parent | 3cdd44798b7565639ca08dc051fbe21e41d546fa (diff) | |
download | tdepowersave-fe9b5d95c9a717fea16685ed7c175e1659d7127c.tar.gz tdepowersave-fe9b5d95c9a717fea16685ed7c175e1659d7127c.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/hardware.cpp')
-rw-r--r-- | src/hardware.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/hardware.cpp b/src/hardware.cpp index a07b3e5..fa37a98 100644 --- a/src/hardware.cpp +++ b/src/hardware.cpp @@ -250,7 +250,7 @@ void HardwareInfo::processMessage (msg_type type, TQString message, TQString val } } } else if (message.startsWith("DeviceRemoved")) { - if (allUDIs.tqcontains(value)) { + if (allUDIs.contains(value)) { if (checkIfHandleDevice(value, &_type)) { switch (_type) { case BATTERY: @@ -276,7 +276,7 @@ void HardwareInfo::processMessage (msg_type type, TQString message, TQString val } break; case HAL_PROPERTY_CHANGED: - if (!message.isEmpty() && allUDIs.tqcontains( message )) { + if (!message.isEmpty() && allUDIs.contains( message )) { if (value.startsWith( "ac_adapter.present" )) { TQTimer::singleShot(50, this, TQT_SLOT(checkACAdapterState())); } else if (value.startsWith( "battery." )) { @@ -442,9 +442,9 @@ bool HardwareInfo::checkIfHandleDevice ( TQString _udi, int *type) { bool ret = true; if (dbus_HAL->halGetPropertyStringList( _udi, "info.capabilities", &_cap) && !_cap.isEmpty()) { - if (_cap.tqcontains("ac_adapter")) { + if (_cap.contains("ac_adapter")) { *type = BATTERY; - } else if (_cap.tqcontains("button")) { + } else if (_cap.contains("button")) { TQString _val; if (dbus_HAL->halGetPropertyString( _udi, "button.type", &_val)) { if (_val.startsWith("lid")) { @@ -459,9 +459,9 @@ bool HardwareInfo::checkIfHandleDevice ( TQString _udi, int *type) { } else { ret = false; } - } else if (_cap.tqcontains("battery")) { + } else if (_cap.contains("battery")) { *type = BATTERY; - } else if (_cap.tqcontains("laptop_panel")) { + } else if (_cap.contains("laptop_panel")) { *type = LAPTOP_PANEL; } else { ret = false; @@ -579,7 +579,7 @@ void HardwareInfo::checkSuspend() { &_ret_b )) { suspend_states.suspend2ram_can = _ret_b; if (_ret_b) { - if (ret.tqcontains( "Suspend" )) { + if (ret.contains( "Suspend" )) { suspend_states.suspend2ram = true; suspend_states.suspend2ram_allowed = dbus_HAL->isUserPrivileged(PRIV_SUSPEND, HAL_COMPUTER_UDI); @@ -600,7 +600,7 @@ void HardwareInfo::checkSuspend() { &_ret_b )) { suspend_states.suspend2disk_can = _ret_b; if (_ret_b) { - if (ret.tqcontains( "Hibernate" )) { + if (ret.contains( "Hibernate" )) { suspend_states.suspend2disk = true; suspend_states.suspend2disk_allowed = dbus_HAL->isUserPrivileged(PRIV_HIBERNATE, @@ -620,7 +620,7 @@ void HardwareInfo::checkSuspend() { if (dbus_HAL->halGetPropertyBool( HAL_COMPUTER_UDI, "power_management.can_standby", &_ret_b )) { suspend_states.standby_can = _ret_b; if (_ret_b) { - if (ret.tqcontains( "Standby" )) { + if (ret.contains( "Standby" )) { suspend_states.standby = true; suspend_states.standby_allowed = dbus_HAL->isUserPrivileged(PRIV_STANDBY, HAL_COMPUTER_UDI); @@ -740,7 +740,7 @@ void HardwareInfo::checkBrightness() { // we should asume there is only one laptop panel device in the system if (dbus_HAL->halGetPropertyInt(devices.first(), "laptop_panel.num_levels", &retval )) { udis.insert("laptop_panel", new TQString( devices.first() )); - if (!allUDIs.tqcontains( devices.first() )) + if (!allUDIs.contains( devices.first() )) allUDIs.append( devices.first() ); if (retval > 1) { @@ -808,7 +808,7 @@ bool HardwareInfo::intialiseHWInfo() { for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) { // we need a deep copy udis.insert("acadapter", new TQString( *it )); - if (!allUDIs.tqcontains( *it )) + if (!allUDIs.contains( *it )) allUDIs.append( *it ); checkACAdapterState(); } @@ -821,7 +821,7 @@ bool HardwareInfo::intialiseHWInfo() { for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) { // we need a deep copy udis.insert("lidclose", new TQString( *it )); - if (!allUDIs.tqcontains( *it )) + if (!allUDIs.contains( *it )) allUDIs.append( *it ); checkLidcloseState(); } @@ -834,7 +834,7 @@ bool HardwareInfo::intialiseHWInfo() { if (!ret.isEmpty()) { // there should be normaly only one device, but let be sure for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) { - if (!allUDIs.tqcontains( *it )) + if (!allUDIs.contains( *it )) allUDIs.append( *it ); BatteryList.append( new Battery(dbus_HAL, *it) ); } @@ -910,7 +910,7 @@ void HardwareInfo::checkLidcloseState() { void HardwareInfo::updateBatteryValues (TQString udi, TQString property) { kdDebugFuncIn(trace); - if (!udi.isEmpty() && allUDIs.tqcontains( udi )) { + if (!udi.isEmpty() && allUDIs.contains( udi )) { // find effected battery object Battery *bat; for (bat = BatteryList.first(); bat; bat = BatteryList.next() ) { |