summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imap4.cc
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
commit4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch)
tree766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kioslaves/imap4/imap4.cc
parent469cc56a805bd3d6940d54adbef554877c29853c (diff)
downloadtdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz
tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves/imap4/imap4.cc')
-rw-r--r--kioslaves/imap4/imap4.cc68
1 files changed, 34 insertions, 34 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 {