summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4
diff options
context:
space:
mode:
Diffstat (limited to 'kioslaves/imap4')
-rw-r--r--kioslaves/imap4/imap4.cc68
-rw-r--r--kioslaves/imap4/imapinfo.cc30
-rw-r--r--kioslaves/imap4/imaplist.cc12
-rw-r--r--kioslaves/imap4/imapparser.cc36
-rw-r--r--kioslaves/imap4/imapparser.h4
-rw-r--r--kioslaves/imap4/mailaddress.cc4
-rw-r--r--kioslaves/imap4/mailheader.cc8
-rw-r--r--kioslaves/imap4/mimehdrline.cc10
-rw-r--r--kioslaves/imap4/mimeheader.cc30
-rw-r--r--kioslaves/imap4/mimeheader.h4
-rw-r--r--kioslaves/imap4/mimeio.cc8
-rw-r--r--kioslaves/imap4/rfcdecoder.cc12
-rw-r--r--kioslaves/imap4/rfcdecoder.h2
13 files changed, 114 insertions, 114 deletions
diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc
index b04b5b60a..12cf93e19 100644
--- a/kioslaves/imap4/imap4.cc
+++ b/kioslaves/imap4/imap4.cc
@@ -228,11 +228,11 @@ IMAP4Protocol::get (const KURL & _url)
// the logic is in the app.
TQString aUpper = aSection.upper();
- if (aUpper.tqfind ("STRUCTURE") != -1)
+ if (aUpper.find ("STRUCTURE") != -1)
{
aSection = "BODYSTRUCTURE";
}
- else if (aUpper.tqfind ("ENVELOPE") != -1)
+ else if (aUpper.find ("ENVELOPE") != -1)
{
aSection = "UID RFC822.SIZE FLAGS ENVELOPE";
if (hasCapability("IMAP4rev1")) {
@@ -246,12 +246,12 @@ IMAP4Protocol::get (const KURL & _url)
{
aSection = "UID RFC822.HEADER RFC822.SIZE FLAGS";
}
- else if (aUpper.tqfind ("BODY.PEEK[") != -1)
+ else if (aUpper.find ("BODY.PEEK[") != -1)
{
- if (aUpper.tqfind ("BODY.PEEK[]") != -1)
+ if (aUpper.find ("BODY.PEEK[]") != -1)
{
if (!hasCapability("IMAP4rev1")) // imap4 does not know BODY.PEEK[]
- aSection.tqreplace("BODY.PEEK[]", "RFC822.PEEK");
+ aSection.replace("BODY.PEEK[]", "RFC822.PEEK");
}
aSection.prepend("UID RFC822.SIZE FLAGS ");
}
@@ -309,7 +309,7 @@ IMAP4Protocol::get (const KURL & _url)
{
// get the MIME header and fill getLastHandled()
TQString mySection = aSection;
- mySection.tqreplace("]", ".MIME]");
+ mySection.replace("]", ".MIME]");
cmd = sendCommand (imapCommand::clientFetch (aSequence, mySection));
do
{
@@ -342,11 +342,11 @@ IMAP4Protocol::get (const KURL & _url)
if (cmd && !cmd->isComplete ())
{
- if ((aUpper.tqfind ("BODYSTRUCTURE") != -1)
- || (aUpper.tqfind ("FLAGS") != -1)
- || (aUpper.tqfind ("UID") != -1)
- || (aUpper.tqfind ("ENVELOPE") != -1)
- || (aUpper.tqfind ("BODY.PEEK[0]") != -1
+ if ((aUpper.find ("BODYSTRUCTURE") != -1)
+ || (aUpper.find ("FLAGS") != -1)
+ || (aUpper.find ("UID") != -1)
+ || (aUpper.find ("ENVELOPE") != -1)
+ || (aUpper.find ("BODY.PEEK[0]") != -1
&& (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX)))
{
if (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX)
@@ -440,8 +440,8 @@ IMAP4Protocol::listDir (const KURL & _url)
UDSEntry entry;
UDSAtom atom;
KURL aURL = _url;
- if (aURL.path().tqfind(';') != -1)
- aURL.setPath(aURL.path().left(aURL.path().tqfind(';')));
+ if (aURL.path().find(';') != -1)
+ aURL.setPath(aURL.path().left(aURL.path().find(';')));
kdDebug(7116) << "IMAP4Protocol::listDir - got " << listResponses.count () << endl;
@@ -588,7 +588,7 @@ IMAP4Protocol::listDir (const KURL & _url)
bool withSubject = mySection.isEmpty();
if (mySection.isEmpty()) mySection = "UID RFC822.SIZE ENVELOPE";
- bool withFlags = mySection.upper().tqfind("FLAGS") != -1;
+ bool withFlags = mySection.upper().find("FLAGS") != -1;
imapCommand *fetch =
sendCommand (imapCommand::
clientFetch (mySequence, mySection));
@@ -875,7 +875,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
if (hasCapability("UIDPLUS"))
{
TQString uid = cmd->resultInfo();
- if (uid.tqfind("APPENDUID") != -1)
+ if (uid.find("APPENDUID") != -1)
{
uid = uid.section(" ", 2, 2);
uid.truncate(uid.length()-1);
@@ -930,7 +930,7 @@ IMAP4Protocol::mkdir (const KURL & _url, int)
parseURL(_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if (type == ITYPE_BOX)
{
- bool ask = ( aInfo.tqfind( "ASKUSER" ) != -1 );
+ bool ask = ( aInfo.find( "ASKUSER" ) != -1 );
if ( ask &&
messageBox(QuestionYesNo,
i18n("The following folder will be created on the server: %1 "
@@ -972,14 +972,14 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
if (dType != ITYPE_BOX && dType != ITYPE_DIR_AND_BOX)
{
// this might be konqueror
- int sub = dBox.tqfind (sBox);
+ int sub = dBox.find (sBox);
// might be moving to upper folder
if (sub > 0)
{
KURL testDir = dest;
- TQString subDir = dBox.right (dBox.length () - dBox.tqfindRev ('/'));
+ TQString subDir = dBox.right (dBox.length () - dBox.findRev ('/'));
TQString topDir = dBox.left (sub);
testDir.setPath ("/" + topDir);
dType =
@@ -1049,7 +1049,7 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
if (hasCapability("UIDPLUS"))
{
TQString uid = cmd->resultInfo();
- if (uid.tqfind("COPYUID") != -1)
+ if (uid.find("COPYUID") != -1)
{
uid = uid.section(" ", 2, 3);
uid.truncate(uid.length()-1);
@@ -2108,7 +2108,7 @@ bool IMAP4Protocol::makeLogin ()
}
}
- if ( greeting.tqcontains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
+ if ( greeting.contains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
removeCapability( "ANNOTATEMORE" );
}
@@ -2349,7 +2349,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox,
TQString mailboxName = item.name ();
// some beautification
- if (mailboxName.tqfind (myBox) == 0 && mailboxName.length() > myBox.length())
+ if (mailboxName.find (myBox) == 0 && mailboxName.length() > myBox.length())
{
mailboxName =
mailboxName.right (mailboxName.length () - myBox.length ());
@@ -2363,7 +2363,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox,
atom.m_uds = UDS_NAME;
if (!item.hierarchyDelimiter().isEmpty() &&
- mailboxName.tqfind(item.hierarchyDelimiter()) != -1)
+ mailboxName.find(item.hierarchyDelimiter()) != -1)
atom.m_str = mailboxName.section(item.hierarchyDelimiter(), -1);
else
atom.m_str = mailboxName;
@@ -2473,7 +2473,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
// get the delimiter
TQString myNamespace = namespaceForBox( _box );
kdDebug(7116) << "IMAP4::parseURL - namespace=" << myNamespace << endl;
- if ( namespaceToDelimiter.tqcontains(myNamespace) )
+ if ( namespaceToDelimiter.contains(myNamespace) )
{
_hierarchyDelimiter = namespaceToDelimiter[myNamespace];
kdDebug(7116) << "IMAP4::parseURL - delimiter=" << _hierarchyDelimiter << endl;
@@ -2524,7 +2524,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
}
// if we got no list response for the box see if it's a prefix
if ( retVal == ITYPE_UNKNOWN &&
- namespaceToDelimiter.tqcontains(_box) ) {
+ namespaceToDelimiter.contains(_box) ) {
retVal = ITYPE_DIR;
}
} else {
@@ -2554,17 +2554,17 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
{
if (!_uid.isEmpty ())
{
- if (_uid.tqfind (':') == -1 && _uid.tqfind (',') == -1
- && _uid.tqfind ('*') == -1)
+ if (_uid.find (':') == -1 && _uid.find (',') == -1
+ && _uid.find ('*') == -1)
retVal = ITYPE_MSG;
}
}
if (retVal == ITYPE_MSG)
{
- if ( (_section.tqfind ("BODY.PEEK[", 0, false) != -1 ||
- _section.tqfind ("BODY[", 0, false) != -1) &&
- _section.tqfind(".MIME") == -1 &&
- _section.tqfind(".HEADER") == -1 )
+ if ( (_section.find ("BODY.PEEK[", 0, false) != -1 ||
+ _section.find ("BODY[", 0, false) != -1) &&
+ _section.find(".MIME") == -1 &&
+ _section.find(".HEADER") == -1 )
retVal = ITYPE_ATTACH;
}
if ( _hierarchyDelimiter.isEmpty() &&
@@ -2574,7 +2574,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
// we try to reconstruct it from the URL
if (!_box.isEmpty())
{
- int start = _url.path().tqfindRev(_box);
+ int start = _url.path().findRev(_box);
if (start != -1)
_hierarchyDelimiter = _url.path().mid(start-1, start);
kdDebug(7116) << "IMAP4::parseURL - reconstructed delimiter:" << _hierarchyDelimiter
@@ -2629,9 +2629,9 @@ void IMAP4Protocol::flushOutput(TQString contentEncoding)
{
// get the coding from the MIME header
TQByteArray decoded;
- if (contentEncoding.tqfind("quoted-printable", 0, false) == 0)
+ if (contentEncoding.find("quoted-printable", 0, false) == 0)
decoded = KCodecs::quotedPrintableDecode(outputCache);
- else if (contentEncoding.tqfind("base64", 0, false) == 0)
+ else if (contentEncoding.find("base64", 0, false) == 0)
KCodecs::base64Decode(outputCache, decoded);
else
decoded = outputCache;
@@ -2697,7 +2697,7 @@ IMAP4Protocol::assureBox (const TQString & aBox, bool readonly)
}
completeQueue.removeRef (cmd);
if (found) {
- if (cmdInfo.tqfind("permission", 0, false) != -1) {
+ if (cmdInfo.find("permission", 0, false) != -1) {
// not allowed to enter this folder
error(ERR_ACCESS_DENIED, cmdInfo);
} else {
diff --git a/kioslaves/imap4/imapinfo.cc b/kioslaves/imap4/imapinfo.cc
index be955c233..4d1fc805c 100644
--- a/kioslaves/imap4/imapinfo.cc
+++ b/kioslaves/imap4/imapinfo.cc
@@ -147,8 +147,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
else if (tokens[2] == "[PERMANENTFLAGS")
{
- int flagsStart = line.tqfind('(');
- int flagsEnd = line.tqfind(')');
+ int flagsStart = line.find('(');
+ int flagsEnd = line.find(')');
kdDebug(7116) << "Checking permFlags from " << flagsStart << " to " << flagsEnd << endl;
if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd)
@@ -170,8 +170,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
}
else if (tokens[1] == "FLAGS")
{
- int flagsStart = line.tqfind ('(');
- int flagsEnd = line.tqfind (')');
+ int flagsStart = line.find ('(');
+ int flagsEnd = line.find (')');
if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd)
setFlags (_flags (line.mid (flagsStart, flagsEnd).latin1() ));
@@ -206,29 +206,29 @@ ulong imapInfo::_flags (const TQCString & inFlags)
if (entry.isEmpty ())
flagsString.clear();
- else if (0 != entry.tqcontains ("\\SEEN"))
+ else if (0 != entry.contains ("\\SEEN"))
flags ^= Seen;
- else if (0 != entry.tqcontains ("\\ANSWERED"))
+ else if (0 != entry.contains ("\\ANSWERED"))
flags ^= Answered;
- else if (0 != entry.tqcontains ("\\FLAGGED"))
+ else if (0 != entry.contains ("\\FLAGGED"))
flags ^= Flagged;
- else if (0 != entry.tqcontains ("\\DELETED"))
+ else if (0 != entry.contains ("\\DELETED"))
flags ^= Deleted;
- else if (0 != entry.tqcontains ("\\DRAFT"))
+ else if (0 != entry.contains ("\\DRAFT"))
flags ^= Draft;
- else if (0 != entry.tqcontains ("\\RECENT"))
+ else if (0 != entry.contains ("\\RECENT"))
flags ^= Recent;
- else if (0 != entry.tqcontains ("\\*"))
+ else if (0 != entry.contains ("\\*"))
flags ^= User;
// non standard kmail falgs
- else if ( entry.tqcontains( "KMAILFORWARDED" ) || entry.tqcontains( "$FORWARDED" ) )
+ else if ( entry.contains( "KMAILFORWARDED" ) || entry.contains( "$FORWARDED" ) )
flags = flags | Forwarded;
- else if ( entry.tqcontains( "KMAILTODO" ) || entry.tqcontains( "$TODO" ) )
+ else if ( entry.contains( "KMAILTODO" ) || entry.contains( "$TODO" ) )
flags = flags | Todo;
- else if ( entry.tqcontains( "KMAILWATCHED" ) || entry.tqcontains( "$WATCHED" ) )
+ else if ( entry.contains( "KMAILWATCHED" ) || entry.contains( "$WATCHED" ) )
flags = flags | Watched;
- else if ( entry.tqcontains( "KMAILIGNORED" ) || entry.tqcontains( "$IGNORED" ) )
+ else if ( entry.contains( "KMAILIGNORED" ) || entry.contains( "$IGNORED" ) )
flags = flags | Ignored;
}
diff --git a/kioslaves/imap4/imaplist.cc b/kioslaves/imap4/imaplist.cc
index 6c9dad64f..13309089e 100644
--- a/kioslaves/imap4/imaplist.cc
+++ b/kioslaves/imap4/imaplist.cc
@@ -116,17 +116,17 @@ void imapList::parseAttributes( parseString & str )
orig = parser_->parseOneWordC(str);
attributes_ << orig;
attribute = orig.lower();
- if (-1 != attribute.tqfind ("\\noinferiors"))
+ if (-1 != attribute.find ("\\noinferiors"))
noInferiors_ = true;
- else if (-1 != attribute.tqfind ("\\noselect"))
+ else if (-1 != attribute.find ("\\noselect"))
noSelect_ = true;
- else if (-1 != attribute.tqfind ("\\marked"))
+ else if (-1 != attribute.find ("\\marked"))
marked_ = true;
- else if (-1 != attribute.tqfind ("\\unmarked"))
+ else if (-1 != attribute.find ("\\unmarked"))
unmarked_ = true;
- else if (-1 != attribute.tqfind ("\\hastqchildren"))
+ else if (-1 != attribute.find ("\\hastqchildren"))
hasChildren_ = true;
- else if (-1 != attribute.tqfind ("\\hasnotqchildren"))
+ else if (-1 != attribute.find ("\\hasnotqchildren"))
hasNoChildren_ = true;
else
kdDebug(7116) << "imapList::imapList: bogus attribute " << attribute << endl;
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc
index 37ae46caa..3e16e262d 100644
--- a/kioslaves/imap4/imapparser.cc
+++ b/kioslaves/imap4/imapparser.cc
@@ -122,7 +122,7 @@ imapParser::sendCommand (imapCommand * aCmd)
// we no longer have a box open
currentBox = TQString();
}
- else if (command.tqfind ("SEARCH") != -1
+ else if (command.find ("SEARCH") != -1
|| command == "GETACL"
|| command == "LISTRIGHTS"
|| command == "MYRIGHTS"
@@ -544,7 +544,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest,
case 'A': // ALERT
if (option == "ALERT")
{
- rest.pos = rest.data.tqfind(']', rest.pos) + 1;
+ rest.pos = rest.data.find(']', rest.pos) + 1;
// The alert text is after [ALERT].
// Is this correct or do we need to care about litterals?
selectInfo.setAlert( rest.cstr() );
@@ -563,7 +563,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest,
}
else if (option == "PERMANENTFLAGS")
{
- uint end = rest.data.tqfind(']', rest.pos);
+ uint end = rest.data.find(']', rest.pos);
TQCString flags(rest.data.data() + rest.pos, end - rest.pos);
selectInfo.setPermanentFlags (flags);
rest.pos = end;
@@ -1406,8 +1406,8 @@ void imapParser::parseBody (parseString & inWords)
else
{
TQCString references = parseLiteralC(inWords, true);
- int start = references.tqfind ('<');
- int end = references.tqfindRev ('>');
+ int start = references.find ('<');
+ int end = references.findRev ('>');
if (start < end)
references = references.mid (start, end - start + 1);
envelope->setReferences(references.simplifyWhiteSpace());
@@ -1420,7 +1420,7 @@ void imapParser::parseBody (parseString & inWords)
}
else
{
- if (specifier.tqfind(".MIME") != -1)
+ if (specifier.find(".MIME") != -1)
{
mailHeader *envelope = new mailHeader;
TQString theHeader = parseLiteralC(inWords, false);
@@ -1573,7 +1573,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
if (!lastHandled) lastHandled = new imapCache();
lastHandled->setSize (size);
}
- else if (word.tqfind ("RFC822") == 0)
+ else if (word.find ("RFC822") == 0)
{
// might be RFC822 RFC822.TEXT RFC822.HEADER
parseLiteralC(inWords, true);
@@ -1675,7 +1675,7 @@ void imapParser::parseNamespace (parseString & result)
return;
TQString delimEmpty;
- if ( namespaceToDelimiter.tqcontains( TQString() ) )
+ if ( namespaceToDelimiter.contains( TQString() ) )
delimEmpty = namespaceToDelimiter[TQString()];
namespaceToDelimiter.clear();
@@ -1855,7 +1855,7 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section,
_box = _url.path ();
kdDebug(7116) << "imapParser::parseURL " << _box << endl;
- int paramStart = _box.tqfind("/;");
+ int paramStart = _box.find("/;");
if ( paramStart > -1 )
{
TQString paramString = _box.right( _box.length() - paramStart-2 );
@@ -1868,24 +1868,24 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section,
{
TQString temp = (*it);
- int pt = temp.tqfind ('/');
+ int pt = temp.find ('/');
if (pt > 0)
{
- if (temp.tqfindRev ('"', pt) == -1 || temp.tqfind('"', pt) == -1)
+ if (temp.findRev ('"', pt) == -1 || temp.find('"', pt) == -1)
{
// if we have non-quoted '/' separator we'll just nuke it
temp.truncate(pt);
}
}
- if (temp.tqfind ("section=", 0, false) == 0)
+ if (temp.find ("section=", 0, false) == 0)
_section = temp.right (temp.length () - 8);
- else if (temp.tqfind ("type=", 0, false) == 0)
+ else if (temp.find ("type=", 0, false) == 0)
_type = temp.right (temp.length () - 5);
- else if (temp.tqfind ("uid=", 0, false) == 0)
+ else if (temp.find ("uid=", 0, false) == 0)
_uid = temp.right (temp.length () - 4);
- else if (temp.tqfind ("uidvalidity=", 0, false) == 0)
+ else if (temp.find ("uidvalidity=", 0, false) == 0)
_validity = temp.right (temp.length () - 12);
- else if (temp.tqfind ("info=", 0, false) == 0)
+ else if (temp.find ("info=", 0, false) == 0)
_info = temp.right (temp.length () - 5);
}
// kdDebug(7116) << "URL: section= " << _section << ", type= " << _type << ", uid= " << _uid << endl;
@@ -1911,7 +1911,7 @@ TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stop
if (!inWords.isEmpty() && inWords[0] == '{')
{
TQCString retVal;
- ulong runLen = inWords.tqfind ('}', 1);
+ ulong runLen = inWords.find ('}', 1);
if (runLen > 0)
{
bool proper;
@@ -2076,7 +2076,7 @@ TQString imapParser::namespaceForBox( const TQString & box )
TQString cleanPrefix;
for ( TQValueList<TQString>::Iterator it = list.begin(); it != list.end(); ++it )
{
- if ( !(*it).isEmpty() && box.tqfind( *it ) != -1 )
+ if ( !(*it).isEmpty() && box.find( *it ) != -1 )
return (*it);
}
}
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h
index 8d57cee10..9902534c3 100644
--- a/kioslaves/imap4/imapparser.h
+++ b/kioslaves/imap4/imapparser.h
@@ -60,9 +60,9 @@ public:
if (pos >= data.size()) return TQCString();
return TQCString(data.data() + pos, data.size() - pos + 1);
}
- int tqfind(char c, int index = 0)
+ int find(char c, int index = 0)
{
- int res = data.tqfind(c, index + pos);
+ int res = data.find(c, index + pos);
return (res == -1) ? res : (res - pos);
}
// Warning: does not check for going past end of "data"
diff --git a/kioslaves/imap4/mailaddress.cc b/kioslaves/imap4/mailaddress.cc
index 0775d0f36..0ddd2ff04 100644
--- a/kioslaves/imap4/mailaddress.cc
+++ b/kioslaves/imap4/mailaddress.cc
@@ -105,7 +105,7 @@ mailAddress::parseAddress (char *aCStr)
len = advance;
user = user.mid (1, len - 2); // strip <>
len -= 2;
- pt = user.tqfind('@');
+ pt = user.find('@');
host = user.right (len - pt - 1); // split it into host
user.truncate(pt); // and user
break;
@@ -161,7 +161,7 @@ mailAddress::parseAddress (char *aCStr)
}
else if (user.isEmpty ())
{
- pt = rawFullName.tqfind ('@');
+ pt = rawFullName.find ('@');
if (pt >= 0)
{
user = rawFullName;
diff --git a/kioslaves/imap4/mailheader.cc b/kioslaves/imap4/mailheader.cc
index 76e03ace9..8ae36f4c3 100644
--- a/kioslaves/imap4/mailheader.cc
+++ b/kioslaves/imap4/mailheader.cc
@@ -76,8 +76,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
goto out;
}
if (!qstricmp (label.data (), "Message-ID")) {
- int start = value.tqfindRev ('<');
- int end = value.tqfindRev ('>');
+ int start = value.findRev ('<');
+ int end = value.findRev ('>');
if (start < end)
messageID = value.mid (start, end - start + 1);
else {
@@ -87,8 +87,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
goto out;
}
if (!qstricmp (label.data (), "In-Reply-To")) {
- int start = value.tqfindRev ('<');
- int end = value.tqfindRev ('>');
+ int start = value.findRev ('<');
+ int end = value.findRev ('>');
if (start < end)
inReplyTo = value.mid (start, end - start + 1);
goto out;
diff --git a/kioslaves/imap4/mimehdrline.cc b/kioslaves/imap4/mimehdrline.cc
index 4158e59d5..9646ed26f 100644
--- a/kioslaves/imap4/mimehdrline.cc
+++ b/kioslaves/imap4/mimehdrline.cc
@@ -489,18 +489,18 @@ mimeHdrLine::truncateLine(TQCString aLine, unsigned int truncate)
// see if we have a line of the form "key: value" (like "Subject: bla")
// then we do not want to truncate between key and value
- int validStart = aLine.tqfind(": ");
+ int validStart = aLine.find(": ");
if (validStart > -1) {
validStart += 2;
}
while (len > truncate) {
- cutHere = aLine.tqfindRev(' ', truncate);
+ cutHere = aLine.findRev(' ', truncate);
if (cutHere < 1 || cutHere < validStart) {
- cutHere = aLine.tqfindRev('\t', truncate);
+ cutHere = aLine.findRev('\t', truncate);
if (cutHere < 1) {
- cutHere = aLine.tqfind(' ', 1);
+ cutHere = aLine.find(' ', 1);
if (cutHere < 1) {
- cutHere = aLine.tqfind('\t', 1);
+ cutHere = aLine.find('\t', 1);
if (cutHere < 1) {
// simply truncate
return aLine.left(truncate);
diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc
index d32f7eaca..048eba7a5 100644
--- a/kioslaves/imap4/mimeheader.cc
+++ b/kioslaves/imap4/mimeheader.cc
@@ -168,7 +168,7 @@ mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aLis
TQString *aValue;
TQCString aLabel;
- int pos = aParameter.tqfind ('=');
+ int pos = aParameter.find ('=');
// cout << aParameter.left(pos).data();
aValue = new TQString ();
aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1));
@@ -268,11 +268,11 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
if (aDict)
{
//see if it is a normal parameter
- found = aDict->tqfind (aStr);
+ found = aDict->find (aStr);
if (!found)
{
//might be a continuated or encoded parameter
- found = aDict->tqfind (aStr + "*");
+ found = aDict->find (aStr + "*");
if (!found)
{
//continuated parameter
@@ -284,10 +284,10 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
TQCString search;
search.setNum (part);
search = aStr + "*" + search;
- found = aDict->tqfind (search);
+ found = aDict->find (search);
if (!found)
{
- found = aDict->tqfind (search + "*");
+ found = aDict->find (search + "*");
if (found)
encoded += rfcDecoder::encodeRFC2231String (*found);
}
@@ -298,7 +298,7 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
part++;
}
while (found);
- if (encoded.tqfind ('\'') >= 0)
+ if (encoded.find ('\'') >= 0)
{
retVal = rfcDecoder::decodeRFC2231String (encoded.local8Bit ());
}
@@ -335,7 +335,7 @@ mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue,
{
//see if it needs to get encoded
- if (encoded && aLabel.tqfind ('*') == -1)
+ if (encoded && aLabel.find ('*') == -1)
{
val = rfcDecoder::encodeRFC2231String (aValue);
}
@@ -412,7 +412,7 @@ mimeHeader::outputParameter (TQDict < TQString > *aDict)
while (it.current ())
{
retVal += (";\n\t" + it.currentKey () + "=").latin1 ();
- if (it.current ()->tqfind (' ') > 0 || it.current ()->tqfind (';') > 0)
+ if (it.current ()->find (' ') > 0 || it.current ()->find (';') > 0)
{
retVal += '"' + it.current ()->utf8 () + '"';
}
@@ -527,7 +527,7 @@ mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody,
retVal = 1; //continue with next part
break;
}
- else if (mbox && inputStr.tqfind ("From ") == 0)
+ else if (mbox && inputStr.find ("From ") == 0)
{
retVal = 0; // end of mbox
break;
@@ -556,7 +556,7 @@ mimeHeader::parseHeader (mimeIO & useIO)
while (useIO.inputLine (inputStr))
{
int appended;
- if (inputStr.tqfind ("From ") != 0 || !first)
+ if (inputStr.find ("From ") != 0 || !first)
{
first = false;
appended = my_line.appendStr (inputStr);
@@ -584,7 +584,7 @@ mimeHeader *
mimeHeader::bodyPart (const TQString & _str)
{
// see if it is nested a little deeper
- int pt = _str.tqfind('.');
+ int pt = _str.find('.');
if (pt != -1)
{
TQString tempStr = _str;
@@ -658,9 +658,9 @@ mimeHeader::bodyDecodedBinary ()
{
TQByteArray retVal;
- if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0)
+ if (contentEncoding.find ("quoted-printable", 0, false) == 0)
retVal = KCodecs::quotedPrintableDecode(postMultipartBody);
- else if (contentEncoding.tqfind ("base64", 0, false) == 0)
+ else if (contentEncoding.find ("base64", 0, false) == 0)
KCodecs::base64Decode(postMultipartBody, retVal);
else retVal = postMultipartBody;
@@ -680,9 +680,9 @@ mimeHeader::setBodyEncoded (const TQByteArray & _arr)
TQByteArray setVal;
kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl;
- if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0)
+ if (contentEncoding.find ("quoted-printable", 0, false) == 0)
setVal = KCodecs::quotedPrintableEncode(_arr);
- else if (contentEncoding.tqfind ("base64", 0, false) == 0)
+ else if (contentEncoding.find ("base64", 0, false) == 0)
KCodecs::base64Encode(_arr, setVal);
else
setVal.duplicate (_arr);
diff --git a/kioslaves/imap4/mimeheader.h b/kioslaves/imap4/mimeheader.h
index 14d86e9d0..bc2fd2bcd 100644
--- a/kioslaves/imap4/mimeheader.h
+++ b/kioslaves/imap4/mimeheader.h
@@ -227,7 +227,7 @@ public:
}
TQString typeStr ()
{
- return TQString (contentType.left (contentType.tqfind ('/')));
+ return TQString (contentType.left (contentType.find ('/')));
}
void setTypeStr (const TQString & _str)
{
@@ -236,7 +236,7 @@ public:
TQString subtypeStr ()
{
return TQString (contentType.
- right (contentType.length () - contentType.tqfind ('/') -
+ right (contentType.length () - contentType.find ('/') -
1));
}
void setSubtypeStr (const TQString & _str)
diff --git a/kioslaves/imap4/mimeio.cc b/kioslaves/imap4/mimeio.cc
index 9325df130..757c11a47 100644
--- a/kioslaves/imap4/mimeio.cc
+++ b/kioslaves/imap4/mimeio.cc
@@ -68,7 +68,7 @@ mimeIO::outputMimeLine (const TQCString & inLine)
TQCString aLine = inLine;
int len = inLine.length();
- int theLF = aLine.tqfindRev ('\n');
+ int theLF = aLine.findRev ('\n');
if (theLF == len - 1 && theLF != -1)
{
//we have a trailing LF, now check for CR
@@ -83,7 +83,7 @@ mimeIO::outputMimeLine (const TQCString & inLine)
{
int start, end, offset;
start = 0;
- end = aLine.tqfind ('\n', start);
+ end = aLine.find ('\n', start);
while (end >= 0)
{
offset = 1;
@@ -94,7 +94,7 @@ mimeIO::outputMimeLine (const TQCString & inLine)
}
outputLine (aLine.mid (start, end - start) + theCRLF, end - start + crlfLen);
start = end + offset;
- end = aLine.tqfind ('\n', start);
+ end = aLine.find ('\n', start);
}
outputLine (aLine.mid (start, len - start) + theCRLF, len - start + crlfLen);
}
@@ -178,7 +178,7 @@ mimeIOTQString::inputLine (TQCString & _str)
if (theString.isEmpty ())
return 0;
- int i = theString.tqfind ('\n');
+ int i = theString.find ('\n');
if (i == -1)
return 0;
diff --git a/kioslaves/imap4/rfcdecoder.cc b/kioslaves/imap4/rfcdecoder.cc
index 426911d0e..4eeb207d5 100644
--- a/kioslaves/imap4/rfcdecoder.cc
+++ b/kioslaves/imap4/rfcdecoder.cc
@@ -154,7 +154,7 @@ TQString rfcDecoder::fromIMAP (const TQString & inSrc)
return TQString::fromUtf8 (dst.data ());
}
-/* tqreplace " with \" and \ with \\ " and \ characters */
+/* replace " with \" and \ with \\ " and \ characters */
TQString rfcDecoder::quoteIMAP(const TQString &src)
{
uint len = src.length();
@@ -311,7 +311,7 @@ rfcDecoder::codecForName (const TQString & _str)
if (_str.isEmpty ())
return NULL;
return TQTextCodec::codecForName (_str.lower ().
- tqreplace ("windows", "cp").latin1 ());
+ replace ("windows", "cp").latin1 ());
}
//-----------------------------------------------------------------------------
@@ -338,7 +338,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset,
TQString & language)
{
//do we have a rfc string
- if (_str.tqfind("=?") < 0)
+ if (_str.find("=?") < 0)
return _str;
TQCString aStr = _str.ascii (); // TQString.length() means Unicode chars
@@ -371,7 +371,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset,
else
{
charset = TQCString (beg, i - 1); // -2 + 1 for the zero
- int pt = charset.tqfindRev('*');
+ int pt = charset.findRev('*');
if (pt != -1)
{
// save language for later usage
@@ -628,13 +628,13 @@ rfcDecoder::encodeRFC2231String (const TQString & _str)
const TQString
rfcDecoder::decodeRFC2231String (const TQString & _str)
{
- int p = _str.tqfind ('\'');
+ int p = _str.find ('\'');
//see if it is an rfc string
if (p < 0)
return _str;
- int l = _str.tqfindRev ('\'');
+ int l = _str.findRev ('\'');
//second is language
if (p >= l)
diff --git a/kioslaves/imap4/rfcdecoder.h b/kioslaves/imap4/rfcdecoder.h
index 50ab948e3..2095b2ed2 100644
--- a/kioslaves/imap4/rfcdecoder.h
+++ b/kioslaves/imap4/rfcdecoder.h
@@ -44,7 +44,7 @@ public:
/** Convert Unicode path to modified UTF-7 IMAP mailbox
*/
static TQString toIMAP (const TQString & inSrc);
-/** tqreplace " with \" and \ with \\ " and \ characters */
+/** replace " with \" and \ with \\ " and \ characters */
static TQString quoteIMAP (const TQString & src);
/** remove \ from a string