summaryrefslogtreecommitdiffstats
path: root/kdf/disklist.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 /kdf/disklist.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 'kdf/disklist.cpp')
-rw-r--r--kdf/disklist.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kdf/disklist.cpp b/kdf/disklist.cpp
index b6c07b7..1c21d15 100644
--- a/kdf/disklist.cpp
+++ b/kdf/disklist.cpp
@@ -183,27 +183,27 @@ TQFile f(FSTAB);
while (! t.eof()) {
s=t.readLine();
s=s.simplifyWhiteSpace();
- if ( (!s.isEmpty() ) && (s.tqfind(DELIMITER)!=0) ) {
+ if ( (!s.isEmpty() ) && (s.find(DELIMITER)!=0) ) {
// not empty or commented out by '#'
// kdDebug() << "GOT: [" << s << "]" << endl;
disk = new DiskEntry();// Q_CHECK_PTR(disk);
disk->setMounted(FALSE);
- disk->setDeviceName(expandEscapes(s.left(s.tqfind(BLANK))));
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setDeviceName(expandEscapes(s.left(s.find(BLANK))));
+ s=s.remove(0,s.find(BLANK)+1 );
// kdDebug() << " deviceName: [" << disk->deviceName() << "]" << endl;
#ifdef _OS_SOLARIS_
//device to fsck
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ s=s.remove(0,s.find(BLANK)+1 );
#endif
- disk->setMountPoint(expandEscapes(s.left(s.tqfind(BLANK))));
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setMountPoint(expandEscapes(s.left(s.find(BLANK))));
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
- disk->setFsType(s.left(s.tqfind(BLANK)) );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setFsType(s.left(s.find(BLANK)) );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
- disk->setMountOptions(s.left(s.tqfind(BLANK)) );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setMountOptions(s.left(s.find(BLANK)) );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Mount-Options: [" << disk->mountOptions() << "]" << endl;
if ( (disk->deviceName() != "none")
&& (disk->fsType() != "swap")
@@ -211,7 +211,7 @@ TQFile f(FSTAB);
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
- && (disk->mountPoint().tqfind("/proc") == -1 ) )
+ && (disk->mountPoint().find("/proc") == -1 ) )
replaceDeviceEntry(disk);
else
delete disk;
@@ -295,7 +295,7 @@ void DiskList::dfDone()
if ( !s.isEmpty() ) {
disk = new DiskEntry(); Q_CHECK_PTR(disk);
- if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line
+ if (s.find(BLANK)<0) // devicename was too long, rest in next line
if ( !t.eof() ) { // just appends the next line
v=t.readLine();
s=s.append(v.latin1() );
@@ -305,37 +305,37 @@ void DiskList::dfDone()
//kdDebug() << "EFFECTIVELY GOT " << s.length() << " chars: [" << s << "]" << endl;
- disk->setDeviceName(s.left(s.tqfind(BLANK)) );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setDeviceName(s.left(s.find(BLANK)) );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " DeviceName: [" << disk->deviceName() << "]" << endl;
if (NO_FS_TYPE) {
//kdDebug() << "THERE IS NO FS_TYPE_FIELD!" << endl;
disk->setFsType("?");
} else {
- disk->setFsType(s.left(s.tqfind(BLANK)) );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ disk->setFsType(s.left(s.find(BLANK)) );
+ s=s.remove(0,s.find(BLANK)+1 );
};
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
- u=s.left(s.tqfind(BLANK));
+ u=s.left(s.find(BLANK));
disk->setKBSize(u.toInt() );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Size: [" << disk->kBSize() << "]" << endl;
- u=s.left(s.tqfind(BLANK));
+ u=s.left(s.find(BLANK));
disk->setKBUsed(u.toInt() );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Used: [" << disk->kBUsed() << "]" << endl;
- u=s.left(s.tqfind(BLANK));
+ u=s.left(s.find(BLANK));
disk->setKBAvail(u.toInt() );
- s=s.remove(0,s.tqfind(BLANK)+1 );
+ s=s.remove(0,s.find(BLANK)+1 );
//kdDebug() << " Avail: [" << disk->kBAvail() << "]" << endl;
- s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94%
+ s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
disk->setMountPoint(s);
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
@@ -346,7 +346,7 @@ void DiskList::dfDone()
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
- && (disk->mountPoint().tqfind("/proc") == -1 ) ) {
+ && (disk->mountPoint().find("/proc") == -1 ) ) {
disk->setMounted(TRUE); // its now mounted (df lists only mounted)
replaceDeviceEntry(disk);
} else
@@ -391,10 +391,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
//
// 1999-27-11 Espen Sand:
- // I can't get tqfind() to work. The Disks::compareItems(..) is
+ // I can't get find() to work. The Disks::compareItems(..) is
// never called.
//
- //int pos=disks->tqfind(disk);
+ //int pos=disks->find(disk);
TQString deviceRealName = disk->deviceRealName();
TQString realMountPoint = disk->realMountPoint();
@@ -426,13 +426,13 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
// eg. /cache/cache/.cfs_mnt_points/srv:_home_jesus
// ^ ^
TQString odiskName = olddisk->deviceName();
- int ci=odiskName.tqfind(':'); // goto host-column
- while ((ci =odiskName.tqfind('/',ci)) > 0) {
- odiskName.tqreplace(ci,1,"_");
+ int ci=odiskName.find(':'); // goto host-column
+ while ((ci =odiskName.find('/',ci)) > 0) {
+ odiskName.replace(ci,1,"_");
}//while
// check if there is something that is exactly the tail
// eg. [srv:/tmp3] is exact tail of [/cache/.cfs_mnt_points/srv:_tmp3]
- if ( ( (p=disk->deviceName().tqfindRev(odiskName
+ if ( ( (p=disk->deviceName().findRev(odiskName
,disk->deviceName().length()) )
!= -1)
&& (p + odiskName.length()
@@ -455,10 +455,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
}
#endif
- if (pos != -1) { // tqreplace
+ if (pos != -1) { // replace
DiskEntry * olddisk = disks->at(pos);
- if ( (-1!=olddisk->mountOptions().tqfind("user")) &&
- (-1==disk->mountOptions().tqfind("user")) ) {
+ if ( (-1!=olddisk->mountOptions().find("user")) &&
+ (-1==disk->mountOptions().find("user")) ) {
// add "user" option to new diskEntry
TQString s=disk->mountOptions();
if (s.length()>0) s.append(",");