summaryrefslogtreecommitdiffstats
path: root/klaptopdaemon/portable.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit6335dc55802871b5a43492f217b6edbb420204c4 (patch)
tree50c6c8672a52687568edea475614dfe3d98e62e5 /klaptopdaemon/portable.cpp
parent9b8c9f1f9e974ff0176108cfbd8852cd99ea68c8 (diff)
downloadtdeutils-6335dc55802871b5a43492f217b6edbb420204c4.tar.gz
tdeutils-6335dc55802871b5a43492f217b6edbb420204c4.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klaptopdaemon/portable.cpp')
-rw-r--r--klaptopdaemon/portable.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp
index fda010b..29c4d22 100644
--- a/klaptopdaemon/portable.cpp
+++ b/klaptopdaemon/portable.cpp
@@ -333,7 +333,7 @@ static void acpi_read_batteries() {
f = new TQFile(bat.info_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
- if (buff.tqcontains("design capacity low:", false)) {
+ if (buff.contains("design capacity low:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap_low = rx.cap(1).toInt();
@@ -341,7 +341,7 @@ static void acpi_read_batteries() {
bat.cap_low = 0;
continue;
}
- if (buff.tqcontains("last full capacity:", false)) {
+ if (buff.contains("last full capacity:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap = rx.cap(1).toInt();
@@ -363,7 +363,7 @@ static void acpi_read_batteries() {
f = new TQFile(bat.state_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
- if (buff.tqcontains("present rate:", false)) {
+ if (buff.contains("present rate:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.rate = rx.cap(1).toInt();
@@ -372,7 +372,7 @@ static void acpi_read_batteries() {
present = true;
continue;
}
- if (buff.tqcontains("remaining capacity:", false)) {
+ if (buff.contains("remaining capacity:", false)) {
TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.remaining = rx.cap(1).toInt();
@@ -961,16 +961,16 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
TQLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also "
"be able to choose 'suspend' and 'standby' in the above "
"dialog - check out the help button below to find out "
- "how to do this").tqreplace("\n", TQString()), tqparent);
+ "how to do this").replace("\n", TQString()), tqparent);
return(note);
}
if (::has_acpi()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").tqreplace("\n", TQString()), tqparent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString()), tqparent);
return(note);
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").tqreplace("\n", TQString()), tqparent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString()), tqparent);
return(note);
}
@@ -1580,7 +1580,7 @@ get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index,
while (!f.atEnd() && i < MAP_SIZE) {
TQString l;
f.readLine(l, 500);
- if (l.tqcontains("active limit", false)) {
+ if (l.contains("active limit", false)) {
TQRegExp rx(TQString("%1(\\d+)").tqarg(p));
if (rx.search(l) >= 0) {
bool ok;
@@ -1835,7 +1835,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g
int current, result;
if((result = get_acpi_list('P', acpi_performance_map, "/performance", performance_list, current, acpi_performance_cpu, false, acpi_performance_enable))) {
char tmp[20];
- int ind = performance_list.tqfindIndex(val);
+ int ind = performance_list.findIndex(val);
if (ind < 0 || ind >= MAP_SIZE || current == ind)
return;
snprintf(tmp, sizeof(tmp), "%d", acpi_performance_map[ind]);
@@ -1857,7 +1857,7 @@ laptop_portable::set_system_performance(TQString val) // val = string given by g
invoke_acpi_helper("--cpufreq-25", tmp.latin1(), 0);
return;
case CPUFREQ_24:
- int target = performance_list.tqfindIndex(val);
+ int target = performance_list.findIndex(val);
invoke_acpi_helper("--cpufreq-24", cpufreq_cpu.latin1(), cpufreq_minmax_frequency[target].latin1());
return;
}
@@ -1871,7 +1871,7 @@ laptop_portable::set_system_throttling(TQString val) // val = string given by ge
{
if (::has_acpi()) {
char tmp[20];
- int ind = throttle_list.tqfindIndex(val);
+ int ind = throttle_list.findIndex(val);
if (ind < 0 || ind >= MAP_SIZE)
return;
snprintf(tmp, sizeof(tmp), "%d", acpi_throttle_map[ind]);
@@ -1909,7 +1909,7 @@ acpi_check_button(const char *prefix, TQString &result)
while (!f.atEnd()) {
TQString l;
f.readLine(l, 500);
- if (l.tqcontains("state:")) {
+ if (l.contains("state:")) {
result = name;
v = 1;
break;