summaryrefslogtreecommitdiffstats
path: root/libkmime/kmime_headers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkmime/kmime_headers.cpp')
-rw-r--r--libkmime/kmime_headers.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp
index 40a016343..85d4c4049 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -582,9 +582,9 @@ void AddressField::from7BitString(const TQCString &s)
TQCString n;
//so what do we have here ?
- if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just decode it
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
return;
@@ -598,11 +598,11 @@ void AddressField::from7BitString(const TQCString &s)
case 1:
pos1=0;
- pos2=s.tqfind('<');
+ pos2=s.find('<');
if(pos2!=-1) {
n=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.tqfind('>', pos1);
+ pos2=s.find('>', pos1);
if(pos2!=-1)
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -611,11 +611,11 @@ void AddressField::from7BitString(const TQCString &s)
case 2:
pos1=0;
- pos2=s.tqfind('(');
+ pos2=s.find('(');
if(pos2!=-1) {
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.tqfind(')', pos1);
+ pos2=s.find(')', pos1);
if(pos2!=-1)
n=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -664,9 +664,9 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
e_ncCS=cachedCharset(cs);
//so what do we have here ?
- if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just copy it
n_ame=s;
return;
@@ -680,11 +680,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
case 1:
pos1=0;
- pos2=s.tqfind('<');
+ pos2=s.find('<');
if(pos2!=-1) {
n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace();
pos1=pos2+1;
- pos2=s.tqfind('>', pos1);
+ pos2=s.find('>', pos1);
if(pos2!=-1)
e_mail=s.mid(pos1, pos2-pos1).latin1();
}
@@ -693,11 +693,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
case 2:
pos1=0;
- pos2=s.tqfind('(');
+ pos2=s.find('(');
if(pos2!=-1) {
e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace().latin1();
pos1=pos2+1;
- pos2=s.tqfind(')', pos1);
+ pos2=s.find(')', pos1);
if(pos2!=-1)
n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace();
}
@@ -978,7 +978,7 @@ TQCString Newsgroups::firstGroup()
{
int pos=0;
if(!g_roups.isEmpty()) {
- pos=g_roups.tqfind(',');
+ pos=g_roups.find(',');
if(pos==-1)
return g_roups;
else
@@ -1107,10 +1107,10 @@ TQCString References::next()
TQCString ret;
if(p_os!=0) {
- pos2=r_ef.tqfindRev('>', p_os);
+ pos2=r_ef.findRev('>', p_os);
p_os=0;
if(pos2!=-1) {
- pos1=r_ef.tqfindRev('<', pos2);
+ pos1=r_ef.findRev('<', pos2);
if(pos1!=-1) {
ret=r_ef.mid(pos1, pos2-pos1+1);
p_os=pos1;
@@ -1129,12 +1129,12 @@ TQCString References::at(unsigned int i)
while(pos1!=-1 && cnt < i+1) {
pos2=pos1-1;
- pos1=r_ef.tqfindRev('<', pos2);
+ pos1=r_ef.findRev('<', pos2);
cnt++;
}
if(pos1!=-1) {
- pos2=r_ef.tqfind('>', pos1);
+ pos2=r_ef.find('>', pos1);
if(pos2!=-1)
ret=r_ef.mid(pos1, pos2-pos1+1);
}
@@ -1154,7 +1154,7 @@ void References::append(const TQCString &s)
// remove bogus references
TQStringList::Iterator it = lst.begin();
while (it != lst.end()) {
- if (-1==(*it).tqfind(exp))
+ if (-1==(*it).find(exp))
it = lst.remove(it);
else
it++;
@@ -1233,7 +1233,7 @@ TQString UserAgent::asUnicodeString()
void ContentType::from7BitString(const TQCString &s)
{
- int pos=s.tqfind(';');
+ int pos=s.find(';');
if(pos==-1)
m_imeType=s.simplifyWhiteSpace();
@@ -1274,7 +1274,7 @@ TQString ContentType::asUnicodeString()
TQCString ContentType::mediaType()
{
- int pos=m_imeType.tqfind('/');
+ int pos=m_imeType.find('/');
if(pos==-1)
return m_imeType;
else
@@ -1284,7 +1284,7 @@ TQCString ContentType::mediaType()
TQCString ContentType::subType()
{
- int pos=m_imeType.tqfind('/');
+ int pos=m_imeType.find('/');
if(pos==-1)
return TQCString();
else
@@ -1453,9 +1453,9 @@ TQCString ContentType::getParameter(const char *name)
{
TQCString ret;
int pos1=0, pos2=0;
- pos1=p_arams.tqfind(name, 0, false);
+ pos1=p_arams.find(name, 0, false);
if(pos1!=-1) {
- if( (pos2=p_arams.tqfind(';', pos1))==-1 )
+ if( (pos2=p_arams.find(';', pos1))==-1 )
pos2=p_arams.length();
pos1+=strlen(name)+1;
ret=p_arams.mid(pos1, pos2-pos1);
@@ -1475,12 +1475,12 @@ void ContentType::setParameter(const TQCString &name, const TQCString &value, bo
else
param=name+"="+value;
- pos1=p_arams.tqfind(name.data(), 0, false);
+ pos1=p_arams.find(name.data(), 0, false);
if(pos1==-1) {
p_arams+="; "+param;
}
else {
- pos2=p_arams.tqfind(';', pos1);
+ pos2=p_arams.find(';', pos1);
if(pos2==-1)
pos2=p_arams.length();
p_arams.remove(pos1, pos2-pos1);
@@ -1559,7 +1559,7 @@ void CDisposition::from7BitString(const TQCString &s)
d_isp=CDattachment;
else d_isp=CDinline;
- int pos=s.tqfind("filename=", 0, false);
+ int pos=s.find("filename=", 0, false);
TQCString fn;
if(pos>-1) {
pos+=9;
@@ -1602,7 +1602,7 @@ void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs)
d_isp=CDattachment;
else d_isp=CDinline;
- int pos=s.tqfind("filename=", 0, false);
+ int pos=s.find("filename=", 0, false);
if(pos>-1) {
pos+=9;
f_ilename=s.mid(pos, s.length()-pos);