summaryrefslogtreecommitdiffstats
path: root/kppp
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
commit937b2991d8e78166eea904c80ad04d34607017a4 (patch)
tree2accb8161eab09df5d7a5484ea9ea080ad123168 /kppp
parentdba26cb985af370c33d1767037851705cc561726 (diff)
downloadtdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.tar.gz
tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kppp')
-rwxr-xr-xkppp/Rules/checkrules4
-rw-r--r--kppp/accounting.cpp10
-rw-r--r--kppp/accounts.cpp2
-rw-r--r--kppp/acctselect.cpp4
-rw-r--r--kppp/connect.cpp42
-rw-r--r--kppp/edit.cpp2
-rw-r--r--kppp/kpppwidget.cpp4
-rw-r--r--kppp/logview/monthly.cpp4
-rw-r--r--kppp/modemdb.cpp12
-rw-r--r--kppp/modeminfo.cpp2
-rw-r--r--kppp/modems.cpp2
-rw-r--r--kppp/pppdata.cpp2
-rw-r--r--kppp/ppplog.cpp8
-rw-r--r--kppp/providerdb.cpp12
-rw-r--r--kppp/ruleset.cpp46
15 files changed, 78 insertions, 78 deletions
diff --git a/kppp/Rules/checkrules b/kppp/Rules/checkrules
index 2ac45ec1..9e695d5b 100755
--- a/kppp/Rules/checkrules
+++ b/kppp/Rules/checkrules
@@ -4,8 +4,8 @@ KPPP=`which kppp` || (echo "cannot find kppp"; exit 1)
cd `dirname $0 2> /dev/null` || (echo "\"dirname\" required"; exit 1)
-FILESTOCHECK=`tqfind -name "*.rst" -type f 2> /dev/null` || \
- (echo "\"tqfind\" required\""; exit 1)
+FILESTOCHECK=`find -name "*.rst" -type f 2> /dev/null` || \
+ (echo "\"find\" required\""; exit 1)
for i in ${FILESTOCHECK}
do
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index b9280eda..6ee8ee45 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -384,11 +384,11 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
// split string
TQString b(buffer);
- pos = b.tqfind(':');
+ pos = b.find(':');
while(pos != -1 && nFields < 8) {
field[nFields++] = b.mid(last_pos, pos-last_pos);
last_pos = pos+1;
- pos = b.tqfind(':', last_pos);
+ pos = b.find(':', last_pos);
}
for(int i = 0; i < nFields;i++)
@@ -398,9 +398,9 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
TQString s(buffer);
int del1, del2, del3;
- del1 = s.tqfind(':');
- del2 = s.tqfind(':', del1+1);
- del3 = s.tqfind(':', del2+1);
+ del1 = s.find(':');
+ del2 = s.find(':', del1+1);
+ del3 = s.find(':', del2+1);
if(del1 == -1 || del2 == -1 || del3 == -1) {
// TODO: do something usefull here
return;
diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp
index cbfe03d7..eadace7e 100644
--- a/kppp/accounts.cpp
+++ b/kppp/accounts.cpp
@@ -293,7 +293,7 @@ void AccountWidget::newaccount() {
if(result == TQDialog::Accepted) {
accountlist_l->insertItem(gpppdata.accname());
- accountlist_l->setSelected(accountlist_l->tqfindItem(gpppdata.accname()),
+ accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()),
true);
emit resetaccounts();
gpppdata.save();
diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp
index 4cad3aeb..fd456202 100644
--- a/kppp/acctselect.cpp
+++ b/kppp/acctselect.cpp
@@ -134,7 +134,7 @@ AccountingSelector::AccountingSelector(TQWidget *tqparent, bool _isnewaccount, c
TQString AccountingSelector::fileNameToName(TQString s) {
- s.tqreplace('_', " ");
+ s.replace('_', " ");
return KURL::decode_string(s);
}
@@ -142,7 +142,7 @@ TQString AccountingSelector::fileNameToName(TQString s) {
TQString AccountingSelector::nameToFileName(TQString s) {
- s.tqreplace(' ', "_");
+ s.replace(' ', "_");
return s;
}
diff --git a/kppp/connect.cpp b/kppp/connect.cpp
index bb2c17a2..b02da8db 100644
--- a/kppp/connect.cpp
+++ b/kppp/connect.cpp
@@ -425,7 +425,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.tqcontains(gpppdata.modemBusyResp())) {
+ if(readbuffer.contains(gpppdata.modemBusyResp())) {
timeout_timer->stop();
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -451,7 +451,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.tqcontains(gpppdata.modemNoDialtoneResp())) {
+ if(readbuffer.contains(gpppdata.modemNoDialtoneResp())) {
timeout_timer->stop();
messg->setText(i18n("No Dial Tone"));
@@ -461,7 +461,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.tqcontains(gpppdata.modemNoCarrierResp())) {
+ if(readbuffer.contains(gpppdata.modemNoCarrierResp())) {
if (gpppdata.get_redial_on_nocarrier()) {
timeout_timer->stop();
timeout_timer->start(gpppdata.modemTimeout()*1000);
@@ -492,7 +492,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
return;
}
- if(readbuffer.tqcontains(gpppdata.modemDLPResp())) {
+ if(readbuffer.contains(gpppdata.modemDLPResp())) {
timeout_timer->stop();
messg->setText(i18n("Digital Line Protection Detected."));
@@ -583,12 +583,12 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") {
TQString bm = i18n("Sending %1");
- // tqreplace %USERNAME% and %PASSWORD%
+ // replace %USERNAME% and %PASSWORD%
TQString arg = scriptArgument;
TQRegExp re1("%USERNAME%");
TQRegExp re2("%PASSWORD%");
- arg = arg.tqreplace(re1, gpppdata.storedUsername());
- arg = arg.tqreplace(re2, gpppdata.storedPassword());
+ arg = arg.replace(re1, gpppdata.storedUsername());
+ arg = arg.replace(re2, gpppdata.storedPassword());
if (scriptCommand == "Send")
bm = bm.tqarg(scriptArgument);
@@ -752,7 +752,7 @@ void ConnectWidget::timerEvent(TQTimerEvent *) {
// variable (from the subsequent scan).
TQString ts = scriptArgument;
- int vstart = ts.tqfind( "##" );
+ int vstart = ts.find( "##" );
if( vstart != -1 ) {
ts.remove( vstart, 2 );
ts.insert( vstart, scanvar );
@@ -994,11 +994,11 @@ void ConnectWidget::checkBuffers() {
// Let's check if we are finished with scanning:
// The scanstring have to be in the buffer and the latest character
// was a carriage return or an linefeed (depending on modem setup)
- if( scanning && scanbuffer.tqcontains(scanstr) &&
+ if( scanning && scanbuffer.contains(scanstr) &&
( scanbuffer.right(1) == "\n" || scanbuffer.right(1) == "\r") ) {
scanning = false;
- int vstart = scanbuffer.tqfind( scanstr ) + scanstr.length();
+ int vstart = scanbuffer.find( scanstr ) + scanstr.length();
scanvar = scanbuffer.mid( vstart, scanbuffer.length() - vstart);
scanvar = scanvar.stripWhiteSpace();
@@ -1008,10 +1008,10 @@ void ConnectWidget::checkBuffers() {
}
if(expecting) {
- if(readbuffer.tqcontains(expectstr)) {
+ if(readbuffer.contains(expectstr)) {
expecting = false;
// keep everything after the expected string
- readbuffer.remove(0, readbuffer.tqfind(expectstr) + expectstr.length());
+ readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length());
TQString ts = i18n("Found: %1").tqarg(expectstr);
emit debugMessage(ts);
@@ -1021,7 +1021,7 @@ void ConnectWidget::checkBuffers() {
}
}
- if (loopend && readbuffer.tqcontains(loopstr[loopnest])) {
+ if (loopend && readbuffer.contains(loopstr[loopnest])) {
expecting = false;
readbuffer = "";
TQString ts = i18n("Looping: %1").tqarg(loopstr[loopnest]);
@@ -1127,7 +1127,7 @@ void ConnectWidget::setExpect(const TQString &n) {
expectstr = n;
TQString ts = i18n("Expecting: %1").tqarg(n);
- ts.tqreplace(TQRegExp("\n"), "<LF>");
+ ts.replace(TQRegExp("\n"), "<LF>");
emit debugMessage(ts);
// check if the expected string is in the read buffer already.
@@ -1382,7 +1382,7 @@ void auto_hostname() {
if (hostname_entry != 0L) {
new_hostname=hostname_entry->h_name;
- dot=new_hostname.tqfind('.');
+ dot=new_hostname.find('.');
new_hostname=new_hostname.remove(dot,new_hostname.length()-dot);
Requester::rq->setHostname(new_hostname);
modified_hostname = TRUE;
@@ -1427,11 +1427,11 @@ void add_domain(const TQString &domain) {
write(fd, tmp.data(), tmp.length());
for(int j=0; j < i; j++) {
- if((resolv[j].tqcontains("domain") ||
- ( resolv[j].tqcontains("nameserver")
- && !resolv[j].tqcontains("#kppp temp entry")
+ if((resolv[j].contains("domain") ||
+ ( resolv[j].contains("nameserver")
+ && !resolv[j].contains("#kppp temp entry")
&& gpppdata.exDNSDisabled()))
- && !resolv[j].tqcontains("#entry disabled by kppp")) {
+ && !resolv[j].contains("#entry disabled by kppp")) {
TQCString tmp = "# " + resolv[j].local8Bit() +
" \t#entry disabled by kppp\n";
write(fd, tmp, tmp.length());
@@ -1510,8 +1510,8 @@ void removedns() {
if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) {
for(int j=0; j < i; j++) {
- if(resolv[j].tqcontains("#kppp temp entry")) continue;
- if(resolv[j].tqcontains("#entry disabled by kppp")) {
+ if(resolv[j].contains("#kppp temp entry")) continue;
+ if(resolv[j].contains("#entry disabled by kppp")) {
TQCString tmp = resolv[j].local8Bit();
write(fd, tmp.data()+2, tmp.length() - 27);
write(fd, "\n", 1);
diff --git a/kppp/edit.cpp b/kppp/edit.cpp
index e9f049ab..fb1156be 100644
--- a/kppp/edit.cpp
+++ b/kppp/edit.cpp
@@ -724,7 +724,7 @@ DNSWidget::DNSWidget( TQWidget *tqparent, bool isnewaccount, const char *name )
void DNSWidget::DNS_Edit_Changed(const TQString &text) {
TQRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+");
- add->setEnabled(text.tqfind(r) != -1);
+ add->setEnabled(text.find(r) != -1);
}
void DNSWidget::DNS_Entry_Selected(int) {
diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp
index 7549581a..4a335d45 100644
--- a/kppp/kpppwidget.cpp
+++ b/kppp/kpppwidget.cpp
@@ -733,7 +733,7 @@ void KPPPWidget::beginConnect() {
if(!info2.exists()){
TQString string;
- string = i18n("kppp can not tqfind:\n %1\nPlease make sure you have setup "
+ string = i18n("kppp can not find:\n %1\nPlease make sure you have setup "
"your modem device properly "
"and/or adjust the location of the modem device on "
"the modem tab of "
@@ -994,7 +994,7 @@ void KPPPWidget::resetVolume(const TQString &s) {
*/
TQString KPPPWidget::encodeWord(const TQString &s) {
TQString r = s;
- r.tqreplace(TQRegExp("\\"), "\\\\");
+ r.replace(TQRegExp("\\"), "\\\\");
return r;
}
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index 8ac58c16..80adc7bf 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -304,7 +304,7 @@ void MonthlyWidget::plotMonth() {
con = li->connectionName();
// this connection name not in the list and combo box
- if(lstConnections.tqfindIndex(con) == -1) {
+ if(lstConnections.findIndex(con) == -1) {
lstConnections.append(con);
cboConnections->insertItem(con);
}
@@ -513,7 +513,7 @@ void MonthlyWidget::exportWizard() {
con = li->connectionName();
// this connection name not in the list and combo box
- if(lstConnections.tqfindIndex(con) == -1) {
+ if(lstConnections.findIndex(con) == -1) {
lstConnections.append(con);
cboConnections->insertItem(con);
}
diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp
index 74488dca..4da23213 100644
--- a/kppp/modemdb.cpp
+++ b/kppp/modemdb.cpp
@@ -152,7 +152,7 @@ TQStringList *ModemDatabase::models(TQString vendor) {
for(uint i = 0; i < modems.count(); i++) {
CharDict *dict = modems.at(i);
- if(dict->tqfind("Vendor") != 0) {
+ if(dict->find("Vendor") != 0) {
if(vendor == *(*dict)["Vendor"] && (*(*dict)["Name"]).at(0) != '!')
sl->append(*(*dict)["Name"]);
}
@@ -179,7 +179,7 @@ void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
// e = it->current();
while(!it.key().isNull()) {
- if(dict.tqfind(it.key()) == 0) {
+ if(dict.find(it.key()) == 0) {
dict.insert(it.key(), new TQString(it.data()));
}
it++;
@@ -187,7 +187,7 @@ void ModemDatabase::loadModem(const TQString &key, CharDict &dict) {
// check name attribute
if(dict["Name"] == 0 || key[0]=='!') {
- dict.tqreplace("Name", new TQString(key));
+ dict.replace("Name", new TQString(key));
}
// check tqparent attribute
@@ -217,16 +217,16 @@ void ModemDatabase::load() {
// if(strcmp(it->latin1(), "Common") == 0) {
if(*it == "Common") {
TQString s = i18n("Hayes(tm) compatible modem");
- c->tqreplace("Name", new TQString (s));
+ c->replace("Name", new TQString (s));
s = i18n("<Generic>");
- c->tqreplace("Vendor", new TQString(s));
+ c->replace("Vendor", new TQString(s));
}
modems.append(c);
if(modemDB->hasKey("Vendor")) {
TQString vendor = modemDB->readEntry("Vendor");
- if(lvendors->tqfindIndex(vendor) == -1)
+ if(lvendors->findIndex(vendor) == -1)
lvendors->append(vendor);
}
++it;
diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp
index 9aa79b8a..737d468a 100644
--- a/kppp/modeminfo.cpp
+++ b/kppp/modeminfo.cpp
@@ -207,7 +207,7 @@ void ModemTransfer::readtty() {
if (step == 0)
return;
- readbuffer.tqreplace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
+ readbuffer.replace(TQRegExp("[\n\r]")," "); // remove stray \n and \r
readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white
// space
diff --git a/kppp/modems.cpp b/kppp/modems.cpp
index 6fb3a650..84b0979e 100644
--- a/kppp/modems.cpp
+++ b/kppp/modems.cpp
@@ -159,7 +159,7 @@ void ModemsWidget::newmodem() {
if(result == TQDialog::Accepted) {
modemlist_l->insertItem(gpppdata.modname());
- modemlist_l->setSelected(modemlist_l->tqfindItem(gpppdata.modname()),
+ modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()),
true);
emit resetmodems();
gpppdata.save();
diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp
index e856dd2c..62dfeaa9 100644
--- a/kppp/pppdata.cpp
+++ b/kppp/pppdata.cpp
@@ -929,7 +929,7 @@ bool PPPData::setAccountByIndex(int i) {
bool PPPData::isUniqueAccname(const TQString &n) {
- if(n.tqcontains(':'))
+ if(n.contains(':'))
return false;
int current = caccount;
for(int i=0; i <= accounthighcount; i++) {
diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp
index 597cd53d..a5075b3e 100644
--- a/kppp/ppplog.cpp
+++ b/kppp/ppplog.cpp
@@ -163,7 +163,7 @@ void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
// look for remote message
- int pos = (*it).tqfind(rmsg);
+ int pos = (*it).find(rmsg);
if (pos != -1)
{
TQString str = (*it);
@@ -180,7 +180,7 @@ void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) {
for(uint k = 0; hints[k].regexp != 0; k++) {
TQRegExp rx(hints[k].regexp);
TQString l(*it);
- if(l.tqcontains(rx)) {
+ if(l.contains(rx)) {
result.append(i18n(hints[k].answer));
break;
}
@@ -206,11 +206,11 @@ void PPPL_ShowLog() {
TQString conn = TQString::tqfromLatin1("Connect:");
TQStringList::ConstIterator it = sl.begin();
for( ; it != sl.end(); it++) {
- if((*it).tqfind(lcp) >= 0) {
+ if((*it).find(lcp) >= 0) {
foundLCP = true;
break;
}
- if((*it).tqfind(conn) >= 0)
+ if((*it).find(conn) >= 0)
foundConnect = true;
}
if(foundConnect && !foundLCP) {
diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp
index a86b915d..f27c5528 100644
--- a/kppp/providerdb.cpp
+++ b/kppp/providerdb.cpp
@@ -143,11 +143,11 @@ void ProviderDB::accept() {
while(it != map.end()) {
TQString key = it.key();
TQString value = *it;
- if(value.tqcontains(re_username))
- value.tqreplace(re_username, page4->username());
+ if(value.contains(re_username))
+ value.replace(re_username, page4->username());
- if(value.tqcontains(re_password))
- value.tqreplace(re_password, page4->password());
+ if(value.contains(re_password))
+ value.replace(re_password, page4->password());
gpppdata.writeConfig(gpppdata.currentAccountGroup(), key, value);
@@ -296,7 +296,7 @@ void PDB_Provider::setDir(const TQString &_dir) {
TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
TQRegExp re1(" ");
- dir = dir.tqreplace(re1, "_");
+ dir = dir.replace(re1, "_");
dir1 += dir;
TQDir d(dir1);
@@ -458,7 +458,7 @@ void urlEncode(TQString &s) {
TQString s1, tmp;
for(uint i = 0; i < s.length(); i++) {
- if(TQString(UNENCODED_CHARS).tqfind(s[i]) >= 0)
+ if(TQString(UNENCODED_CHARS).find(s[i]) >= 0)
s1 += s[i];
else {
tmp.sprintf("%%%03i", s[i].tqunicode());
diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp
index 6c2131a6..ef9d9517 100644
--- a/kppp/ruleset.cpp
+++ b/kppp/ruleset.cpp
@@ -127,7 +127,7 @@ int RuleSet::load(const TQString &filename) {
} while(!f.atEnd() && backslashed);
// strip whitespace
- line = line.tqreplace(TQRegExp("[ \t\r]"), "");
+ line = line.replace(TQRegExp("[ \t\r]"), "");
// skip comment lines
if((line.left(1) == "#") || line.isEmpty())
continue;
@@ -183,7 +183,7 @@ void RuleSet::addRule(RULE r) {
}
bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
- if(s.tqcontains(TQRegExp("^[0-9]+/[0-9]+$"))) {
+ if(s.contains(TQRegExp("^[0-9]+/[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d/%d", &m, &d);
ret.type = 1;
@@ -192,7 +192,7 @@ bool RuleSet::parseEntry(RULE &ret, TQString s, int year) {
return TRUE;
}
- if(s.tqcontains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
+ if(s.contains(TQRegExp("^[0-9]+\\.[0-9]+$"))) {
int d, m;
sscanf(s.ascii(), "%d.%d", &d, &m);
ret.type = 1;
@@ -245,7 +245,7 @@ bool RuleSet::parseEntries(TQString s, int year,
s = "monday..sunday";
while(s.length()) {
- int pos = s.tqfind(',');
+ int pos = s.find(',');
TQString token;
if(pos == -1) {
token = s;
@@ -258,9 +258,9 @@ bool RuleSet::parseEntries(TQString s, int year,
// we've a token, now check if it defines a
// range
RULE r;
- if(token.tqcontains("..")) {
+ if(token.contains("..")) {
TQString left, right;
- left = token.left(token.tqfind(".."));
+ left = token.left(token.find(".."));
right = token.right(token.length()-2-left.length());
RULE lr, rr;
if(parseEntry(lr, left, year) && parseEntry(rr, right, year)) {
@@ -317,13 +317,13 @@ bool RuleSet::parseRate(double &costs, double &len, double &after, TQString s) {
bool RuleSet::parseLine(const TQString &s) {
- // ### use TQRegExp::cap() instead of mid() and tqfind()
+ // ### use TQRegExp::cap() instead of mid() and find()
// for our french friends -- Bernd
- if(s.tqcontains(TQRegExp("flat_init_costs=\\(.*"))) {
+ if(s.contains(TQRegExp("flat_init_costs=\\(.*"))) {
// parse the time fields
- TQString token = s.mid(s.tqfind("flat_init_costs=(") + 17,
- s.tqfind(")")-s.tqfind("flat_init_costs=(") - 17);
+ TQString token = s.mid(s.find("flat_init_costs=(") + 17,
+ s.find(")")-s.find("flat_init_costs=(") - 17);
// printf("TOKEN=%s\n",token.ascii());
double after;
@@ -342,17 +342,17 @@ bool RuleSet::parseLine(const TQString &s) {
}
- if(s.tqcontains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
+ if(s.contains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) {
// parse the time fields
- TQString token = s.mid(s.tqfind("between(") + 8,
- s.tqfind(")use")-s.tqfind("between(") - 8);
+ TQString token = s.mid(s.find("between(") + 8,
+ s.find(")use")-s.find("between(") - 8);
TQTime t1, t2;
if(!parseTime(t1, t2, token))
return FALSE;
// parse the rate fields
- token = s.mid(s.tqfind("use(") + 4,
- s.tqfindRev(")")-s.tqfind("use(") - 4);
+ token = s.mid(s.find("use(") + 4,
+ s.findRev(")")-s.find("use(") - 4);
double costs;
double len;
double after;
@@ -360,8 +360,8 @@ bool RuleSet::parseLine(const TQString &s) {
return FALSE;
// parse the days
- token = s.mid(s.tqfind("on(") + 3,
- s.tqfind(")betw")-s.tqfind("on(") - 3);
+ token = s.mid(s.find("on(") + 3,
+ s.find(")betw")-s.find("on(") - 3);
if(!parseEntries(token, TQDate::tqcurrentDate().year(),
t1, t2, costs, len, after))
return FALSE;
@@ -370,14 +370,14 @@ bool RuleSet::parseLine(const TQString &s) {
}
// check for the name
- if(s.tqcontains(TQRegExp("name=.*"))) {
+ if(s.contains(TQRegExp("name=.*"))) {
_name = s.right(s.length()-5);
return !_name.isEmpty();
}
// check default entry
- if(s.tqcontains(TQRegExp("default=\\(.*\\)"))) {
+ if(s.contains(TQRegExp("default=\\(.*\\)"))) {
TQString token = s.mid(9, s.length() - 10);
double after;
if(parseRate(default_costs, default_len, after, token))
@@ -385,7 +385,7 @@ bool RuleSet::parseLine(const TQString &s) {
}
// check for "minimum costs"
- if(s.tqcontains(TQRegExp("minimum_costs=.*"))) {
+ if(s.contains(TQRegExp("minimum_costs=.*"))) {
TQString token = s.right(s.length() - strlen("minimum_costs="));
bool ok;
_minimum_costs = token.toDouble(&ok);
@@ -398,7 +398,7 @@ bool RuleSet::parseLine(const TQString &s) {
return TRUE;
}
- if(s.tqcontains(TQRegExp("currency_digits=.*"))) {
+ if(s.contains(TQRegExp("currency_digits=.*"))) {
TQString token = s.mid(16, s.length() - 16);
bool ok;
_currency_digits = token.toInt(&ok);
@@ -406,11 +406,11 @@ bool RuleSet::parseLine(const TQString &s) {
}
// "currency_position" is deprecated so we'll simply ignore it
- if(s.tqcontains(TQRegExp("currency_position=.*")))
+ if(s.contains(TQRegExp("currency_position=.*")))
return TRUE;
// check per connection fee
- if(s.tqcontains(TQRegExp("per_connection="))) {
+ if(s.contains(TQRegExp("per_connection="))) {
TQString token = s.mid(15, s.length()-15);
bool ok;
pcf = token.toDouble(&ok);