summaryrefslogtreecommitdiffstats
path: root/kmail/kmfolderimap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmfolderimap.cpp')
-rw-r--r--kmail/kmfolderimap.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp
index 303b7b01f..21fb82d14 100644
--- a/kmail/kmfolderimap.cpp
+++ b/kmail/kmfolderimap.cpp
@@ -302,7 +302,7 @@ void KMFolderImap::removeMsg( const TQPtrList<KMMessage>& msgList, bool quiet )
KMMessage *msg;
while ( (msg = it.current()) != 0 ) {
++it;
- int idx = tqfind(msg);
+ int idx = find(msg);
assert( idx != -1);
// ATTENTION port me to maildir
KMFolderMbox::removeMsg(idx, quiet);
@@ -327,7 +327,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg)
if (aFolder) {
serNum = aMsg->getMsgSerNum();
kmkernel->undoStack()->pushSingleAction( serNum, aFolder, folder() );
- int idx = aFolder->tqfind( aMsg );
+ int idx = aFolder->find( aMsg );
assert( idx != -1 );
aFolder->take( idx );
}
@@ -412,7 +412,7 @@ int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex
{
if (!msg->isComplete())
{
- int idx = msgParent->tqfind(msg);
+ int idx = msgParent->find(msg);
assert(idx != -1);
msg = msgParent->getMsg(idx);
}
@@ -544,8 +544,8 @@ void KMFolderImap::copyMsg(TQPtrList<KMMessage>& msgList)
TQPtrList<KMMessage> KMFolderImap::splitMessageList(const TQString& set,
TQPtrList<KMMessage>& msgList)
{
- int lastcomma = set.tqfindRev(",");
- int lastdub = set.tqfindRev(":");
+ int lastcomma = set.findRev(",");
+ int lastdub = set.findRev(":");
int last = 0;
if (lastdub > lastcomma) last = lastdub;
else last = lastcomma;
@@ -946,7 +946,7 @@ void KMFolderImap::checkFolders( const TQStringList& subfolderNames,
KMFolderNode *node = folder()->child()->first();
while ( node )
{
- if ( !node->isDir() && subfolderNames.tqfindIndex(node->name()) == -1 )
+ if ( !node->isDir() && subfolderNames.findIndex(node->name()) == -1 )
{
KMFolder* fld = static_cast<KMFolder*>(node);
KMFolderImap* imapFld = static_cast<KMFolderImap*>( fld->storage() );
@@ -1004,11 +1004,11 @@ bool KMFolderImap::mailCheckInProgress() const
void KMFolderImap::setChildrenState( TQString attributes )
{
// update tqchildren state
- if ( attributes.tqfind( "hastqchildren", 0, false ) != -1 )
+ if ( attributes.find( "hastqchildren", 0, false ) != -1 )
{
setHasChildren( FolderStorage::HasChildren );
- } else if ( attributes.tqfind( "hasnotqchildren", 0, false ) != -1 ||
- attributes.tqfind( "noinferiors", 0, false ) != -1 )
+ } else if ( attributes.find( "hasnotqchildren", 0, false ) != -1 ||
+ attributes.find( "noinferiors", 0, false ) != -1 )
{
setHasChildren( FolderStorage::HasNoChildren );
} else
@@ -1123,26 +1123,26 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
close("checkvalidity");
} else {
TQCString cstr((*it).data.data(), (*it).data.size() + 1);
- int a = cstr.tqfind("X-uidValidity: ");
- int b = cstr.tqfind("\r\n", a);
+ int a = cstr.find("X-uidValidity: ");
+ int b = cstr.find("\r\n", a);
TQString uidv;
if ( (b - a - 15) >= 0 )
uidv = cstr.mid(a + 15, b - a - 15);
- a = cstr.tqfind("X-Access: ");
- b = cstr.tqfind("\r\n", a);
+ a = cstr.find("X-Access: ");
+ b = cstr.find("\r\n", a);
TQString access;
if ( (b - a - 10) >= 0 )
access = cstr.mid(a + 10, b - a - 10);
mReadOnly = access == "Read only";
- a = cstr.tqfind("X-Count: ");
- b = cstr.tqfind("\r\n", a);
+ a = cstr.find("X-Count: ");
+ b = cstr.find("\r\n", a);
int exists = -1;
bool ok = false;
if ( (b - a - 9) >= 0 )
exists = cstr.mid(a + 9, b - a - 9).toInt(&ok);
if ( !ok ) exists = -1;
- a = cstr.tqfind( "X-PermanentFlags: " );
- b = cstr.tqfind( "\r\n", a );
+ a = cstr.find( "X-PermanentFlags: " );
+ b = cstr.find( "\r\n", a );
if ( a >= 0 && (b - a - 18) >= 0 )
mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok);
if ( !ok ) mPermanentFlags = 0;
@@ -1296,7 +1296,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
mailUid = msgBase->UID();
// parse the uid from the server and the flags out of the list from
// the server. Format: 1234, 1
- c = (*uid).tqfind(",");
+ c = (*uid).find(",");
serverUid = (*uid).left( c ).toLong();
serverFlags = (*uid).mid( c+1 ).toInt();
if ( mailUid < serverUid ) {
@@ -1326,7 +1326,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
}
// strip the flags from the list of uids, so it can be reused
for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid)
- (*uid).truncate((*uid).tqfind(","));
+ (*uid).truncate((*uid).find(","));
ImapAccountBase::jobData jd( TQString(), (*it).tqparent );
jd.total = (*it).items.count();
if (jd.total == 0)
@@ -1525,23 +1525,23 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
(*it).cdata += TQCString(data, data.size() + 1);
- int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST");
+ int pos = (*it).cdata.find("\r\n--IMAPDIGEST");
if ( pos == -1 ) {
- // if we do not find the pattern in the complete string we will not tqfind
+ // if we do not find the pattern in the complete string we will not find
// it in a substring.
return;
}
if (pos > 0)
{
- int p = (*it).cdata.tqfind("\r\nX-uidValidity:");
+ int p = (*it).cdata.find("\r\nX-uidValidity:");
if (p != -1) setUidValidity((*it).cdata
- .mid(p + 17, (*it).cdata.tqfind("\r\n", p+1) - p - 17));
- int c = (*it).cdata.tqfind("\r\nX-Count:");
+ .mid(p + 17, (*it).cdata.find("\r\n", p+1) - p - 17));
+ int c = (*it).cdata.find("\r\nX-Count:");
if ( c != -1 )
{
bool ok;
int exists = (*it).cdata.mid( c+10,
- (*it).cdata.tqfind("\r\n", c+1) - c-10 ).toInt(&ok);
+ (*it).cdata.find("\r\n", c+1) - c-10 ).toInt(&ok);
if ( ok && exists < count() ) {
kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" <<
exists << ") then folder (" << count() << "), so reload" << endl;
@@ -1558,7 +1558,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
}
(*it).cdata.remove(0, pos);
}
- pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1);
+ pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1);
int flags;
while (pos >= 0)
{
@@ -1571,7 +1571,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
flags = msg->headerField("X-Flags").toInt();
ulong uid = msg->UID();
KMMsgMetaData *md = 0;
- if ( mUidMetaDataMap.tqfind( uid ) ) {
+ if ( mUidMetaDataMap.find( uid ) ) {
md = mUidMetaDataMap[uid];
}
ulong serNum = 0;
@@ -1601,7 +1601,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
// see if we have cached the msgIdMD5 and get the status +
// serial number from there
TQString id = msg->msgIdMD5();
- if ( mMetaDataMap.tqfind( id ) ) {
+ if ( mMetaDataMap.find( id ) ) {
md = mMetaDataMap[id];
msg->setqStatus( md->status() );
if ( md->serNum() != 0 && serNum == 0 ) {
@@ -1637,7 +1637,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
}
(*it).cdata.remove(0, pos);
(*it).done++;
- pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1);
+ pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1);
} // while
}
@@ -2395,7 +2395,7 @@ bool KMFolderImap::isMoveable() const
//-----------------------------------------------------------------------------
ulong KMFolderImap::serNumForUID( ulong uid )
{
- if ( mUidMetaDataMap.tqfind( uid ) ) {
+ if ( mUidMetaDataMap.find( uid ) ) {
KMMsgMetaData *md = mUidMetaDataMap[uid];
return md->serNum();
} else {
@@ -2411,7 +2411,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid )
uid = msg->UID();
}
ulong serNum = msg->getMsgSerNum();
- mUidMetaDataMap.tqreplace( uid, new KMMsgMetaData(msg->status(), serNum) );
+ mUidMetaDataMap.replace( uid, new KMMsgMetaData(msg->status(), serNum) );
}
//-----------------------------------------------------------------------------