summaryrefslogtreecommitdiffstats
path: root/kcontrol/info
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/info')
-rw-r--r--kcontrol/info/info_fbsd.cpp26
-rw-r--r--kcontrol/info/info_linux.cpp14
-rw-r--r--kcontrol/info/info_netbsd.cpp16
-rw-r--r--kcontrol/info/info_openbsd.cpp12
-rw-r--r--kcontrol/info/info_svr4.cpp4
-rw-r--r--kcontrol/info/opengl.cpp8
6 files changed, 40 insertions, 40 deletions
diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp
index 3f67b4b7a..3ccd1c086 100644
--- a/kcontrol/info/info_fbsd.cpp
+++ b/kcontrol/info/info_fbsd.cpp
@@ -347,24 +347,24 @@ bool GetInfo_Devices (TQListView *lbox)
TQString GetController(const TQString &line)
{
- if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.tqfind(":") < 6) ) {
+ if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.find(":") < 6) ) {
TQString controller = line;
- controller.remove(0, controller.tqfind(" at ")+4);
- if (controller.tqfind("-slave") != -1) {
- controller.remove(controller.tqfind("-slave"), controller.length());
- } else if (controller.tqfind("-master") != -1) {
- controller.remove(controller.tqfind("-master"), controller.length());
+ controller.remove(0, controller.find(" at ")+4);
+ if (controller.find("-slave") != -1) {
+ controller.remove(controller.find("-slave"), controller.length());
+ } else if (controller.find("-master") != -1) {
+ controller.remove(controller.find("-master"), controller.length());
} else
controller=TQString::null;
if (!controller.isNull())
return controller;
}
- if (line.tqfind(" on ") != -1) {
+ if (line.find(" on ") != -1) {
TQString controller;
controller = line;
- controller.remove(0, controller.tqfind(" on ")+4);
- if (controller.tqfind(" ") != -1)
- controller.remove(controller.tqfind(" "), controller.length());
+ controller.remove(0, controller.find(" on ")+4);
+ if (controller.find(" ") != -1)
+ controller.remove(controller.find(" "), controller.length());
return controller;
}
return TQString::null;
@@ -373,13 +373,13 @@ TQString GetController(const TQString &line)
Device *GetDevice(const TQString &line)
{
Device *dev;
- int colon = line.tqfind(":");
+ int colon = line.find(":");
if (colon == -1)
return 0;
dev = new Device;
dev->name = line.mid(0, colon);
- dev->description = line.mid(line.tqfind("<")+1, line.length());
- dev->description.remove(dev->description.tqfind(">"), dev->description.length());
+ dev->description = line.mid(line.find("<")+1, line.length());
+ dev->description.remove(dev->description.find(">"), dev->description.length());
return dev;
}
diff --git a/kcontrol/info/info_linux.cpp b/kcontrol/info/info_linux.cpp
index 196029781..18287c45f 100644
--- a/kcontrol/info/info_linux.cpp
+++ b/kcontrol/info/info_linux.cpp
@@ -109,7 +109,7 @@ bool GetInfo_ReadfromFile(TQListView * lbox, const char *FileName,
line = stream.readLine();
if (!line.isEmpty()) {
if (!splitChar.isNull()) {
- int pos = line.tqfind(splitChar);
+ int pos = line.find(splitChar);
s1 = line.left(pos-1).stripWhiteSpace();
s2 = line.mid(pos+1).stripWhiteSpace();
}
@@ -228,11 +228,11 @@ bool GetInfo_Devices(TQListView * lBox)
while (!stream.atEnd()) {
line = stream.readLine();
if (!line.isEmpty()) {
- if (-1 != line.tqfind("character device",0,false)) {
+ if (-1 != line.find("character device",0,false)) {
parent = new TQListViewItem(lBox,parent,i18n("Character Devices"));
parent->setPixmap(0,SmallIcon("chardevice"));
parent->setOpen(true);
- } else if (-1 != line.tqfind("block device",0,false)) {
+ } else if (-1 != line.find("block device",0,false)) {
parent = new TQListViewItem(lBox,parent,i18n("Block Devices"));
parent->setPixmap(0,SmallIcon("blockdevice"));
parent->setOpen(true);
@@ -293,7 +293,7 @@ static void cleanPassword(TQString & str)
while (index >= 0)
{
- index = str.tqfind(passwd, index, FALSE);
+ index = str.find(passwd, index, FALSE);
if (index >= 0) {
index += passwd.length();
while (index < (int) str.length() &&
@@ -473,7 +473,7 @@ bool GetInfo_Partitions(TQListView * lbox)
while (file->readLine(buf, sizeof( buf )) > 0) {
str = TQString::fromLocal8Bit(buf);
if (str.length()) {
- int p = str.tqfind(' '); /* find first space. */
+ int p = str.find(' '); /* find first space. */
if (p)
str.remove(p, 1024); /* erase all chars including space. */
Mounted_Partitions.append(str);
@@ -503,7 +503,7 @@ bool GetInfo_Partitions(TQListView * lbox)
#endif
{
total = avail = 0; /* initialize size.. */
- found_in_List = (Mounted_Partitions.tqcontains(FS_NAME) > 0);
+ found_in_List = (Mounted_Partitions.contains(FS_NAME) > 0);
if (found_in_List && statfs(FS_FILE, &sfs) == 0) {
total = ((LONG_TYPE) sfs.f_blocks) * sfs.f_bsize;
avail = (getuid()? sfs.f_bavail : sfs.f_bfree)
@@ -573,7 +573,7 @@ bool GetInfo_CD_ROM(TQListView * lBox)
if (-1 != rx.search(line)) {
TQString text = rx.cap(1);
TQString value = rx.cap(2);
- if (!text.tqcontains('#')) {
+ if (!text.contains('#')) {
if (value == "0")
value = KStdGuiItem::no().plainText();
if (value == "1")
diff --git a/kcontrol/info/info_netbsd.cpp b/kcontrol/info/info_netbsd.cpp
index 8eb9acf2e..b779eac29 100644
--- a/kcontrol/info/info_netbsd.cpp
+++ b/kcontrol/info/info_netbsd.cpp
@@ -125,18 +125,18 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter,
TQListViewItem *olditem = NULL;
while(!(s = t->readLine().local8Bit()).isEmpty()) {
if (!seencpu) {
- if (s.tqcontains("cpu"))
+ if (s.contains("cpu"))
seencpu = true;
else
continue;
}
- if (s.tqcontains("boot device") ||
- s.tqcontains("WARNING: old BSD partition ID!"))
+ if (s.contains("boot device") ||
+ s.contains("WARNING: old BSD partition ID!"))
break;
if (!filter
- || (filter[0] == '^' && s.tqfind(&filter[1]) == 0)
- || (filter[0] != '^' && s.tqcontains(filter))) {
+ || (filter[0] == '^' && s.find(&filter[1]) == 0)
+ || (filter[0] != '^' && s.contains(filter))) {
if (func)
func(lBox, s);
else
@@ -163,7 +163,7 @@ AddIRQLine(TQListView *lBox, TQString s)
int pos, irqnum;
char numstr[3];
- pos = s.tqfind(" irq ");
+ pos = s.find(" irq ");
irqnum = (pos < 0) ? 0 : atoi(&s.ascii()[pos+5]);
if (irqnum)
snprintf(numstr, 3, "%02d", irqnum);
@@ -221,7 +221,7 @@ bool GetInfo_Sound (TQListView *lbox)
s = lvitem->text(0);
// The autoconf message is in form 'audio0 at auvia0: ...'
- if (s.tqfind("audio") == 0 && (pos = s.tqfind(" at ")) > 0) {
+ if (s.find("audio") == 0 && (pos = s.find(" at ")) > 0) {
pos += 4; // skip " at "
start = s.ascii() + pos;
len = (int) strcspn(start, ":\n\t ");
@@ -253,7 +253,7 @@ bool GetInfo_SCSI (TQListView *lbox)
for(; lvitem; lvitem = lvitem->nextSibling()) {
TQString s = lvitem->text(0);
- if (s.tqcontains("seconds for devices to settle")) {
+ if (s.contains("seconds for devices to settle")) {
lbox->removeItem(lvitem);
break;
}
diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp
index 6a68e33cb..12ec8ee2d 100644
--- a/kcontrol/info/info_openbsd.cpp
+++ b/kcontrol/info/info_openbsd.cpp
@@ -122,16 +122,16 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter,
TQListViewItem *olditem = NULL;
while(!(s = t->readLine()).isNull()) {
if (!seencpu) {
- if (s.tqcontains("cpu"))
+ if (s.contains("cpu"))
seencpu = true;
else
continue;
}
- if (s.tqcontains("boot device") ||
- s.tqcontains("WARNING: old BSD partition ID!"))
+ if (s.contains("boot device") ||
+ s.contains("WARNING: old BSD partition ID!"))
break;
- if (!filter || s.tqcontains(filter)) {
+ if (!filter || s.contains(filter)) {
if (func) {
func(lBox, s, &opaque, false);
}
@@ -180,7 +180,7 @@ void AddIRQLine(TQListView *lBox, TQString s, void **opaque, bool ending)
return;
}
- pos = s.tqfind(" irq ");
+ pos = s.find(" irq ");
irqnum = (pos < 0) ? 0 : atoi(&p[pos+5]);
if (irqnum) {
s.sprintf("%02d%s", irqnum, p);
@@ -232,7 +232,7 @@ bool GetInfo_Sound (TQListView *lbox)
char *dev;
s = lvitem->text(0);
- if ((pos = s.tqfind("at ")) >= 0) {
+ if ((pos = s.find("at ")) >= 0) {
pos += 3; // skip "at "
start = end = s.ascii();
for(; (*end!=':') && (*end!='\n'); end++);
diff --git a/kcontrol/info/info_svr4.cpp b/kcontrol/info/info_svr4.cpp
index 1f71246b7..ba491a50e 100644
--- a/kcontrol/info/info_svr4.cpp
+++ b/kcontrol/info/info_svr4.cpp
@@ -55,9 +55,9 @@ bool GetInfo_ReadfromFile( TQListView *lBox, char *Name, char splitchar )
}
TQString s1 = TQString::fromLocal8Bit(buf);
- TQString s2 = s1.mid(s1.tqfind(splitchar)+1);
+ TQString s2 = s1.mid(s1.find(splitchar)+1);
- s1.truncate(s1.tqfind(splitchar));
+ s1.truncate(s1.find(splitchar));
if(!(s1.isEmpty() || s2.isEmpty()))
olditem = new TQListViewItem(lBox, olditem, s1, s2);
}
diff --git a/kcontrol/info/opengl.cpp b/kcontrol/info/opengl.cpp
index c92d85721..f04a93d06 100644
--- a/kcontrol/info/opengl.cpp
+++ b/kcontrol/info/opengl.cpp
@@ -107,7 +107,7 @@ static bool get_dri_device()
TQTextStream stream(&file);
TQString line = stream.readLine();
if (!line.isEmpty()) {
- dri_info.module = line.mid(0, line.tqfind(0x20));
+ dri_info.module = line.mid(0, line.find(0x20));
// possible formats, for regression testing
// line = " PCI:01:00:0";
@@ -115,8 +115,8 @@ static bool get_dri_device()
TQRegExp rx = TQRegExp("\\b[Pp][Cc][Ii][:]([0-9a-fA-F]+[:])?([0-9a-fA-F]+[:][0-9a-fA-F]+[:.][0-9a-fA-F]+)\\b");
if (rx.search(line)>0) {
dri_info.pci = rx.cap(2);
- int end = dri_info.pci.tqfindRev(':');
- int end2 = dri_info.pci.tqfindRev('.');
+ int end = dri_info.pci.findRev(':');
+ int end2 = dri_info.pci.findRev('.');
if (end2>end) end=end2;
dri_info.pci[end]='.';
@@ -151,7 +151,7 @@ static bool get_dri_device() {
TQStringList pci_info;
if (ReadPipe("sysctl -n hw.dri.0.name",pci_info)) {
- dri_info.module = pci_info[0].mid(0, pci_info[0].tqfind(0x20));
+ dri_info.module = pci_info[0].mid(0, pci_info[0].find(0x20));
}
return false;
}