diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch) | |
tree | 766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kmail/kmfoldercachedimap.cpp | |
parent | 469cc56a805bd3d6940d54adbef554877c29853c (diff) | |
download | tdepim-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 'kmail/kmfoldercachedimap.cpp')
-rw-r--r-- | kmail/kmfoldercachedimap.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp index de9f4e007..d23a6ea5c 100644 --- a/kmail/kmfoldercachedimap.cpp +++ b/kmail/kmfoldercachedimap.cpp @@ -549,7 +549,7 @@ int KMFolderCachedImap::addMsgInternal( KMMessage* msg, bool newMail, if ( imapPath() == "/INBOX/" ) filter = true; } else { - if ( GlobalSettings::filterSourceFolders().tqcontains( folder()->id() ) ) + if ( GlobalSettings::filterSourceFolders().contains( folder()->id() ) ) filter = true; } if ( filter ) @@ -674,7 +674,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) mapReloaded = true; } - TQMap<ulong,int>::Iterator it = uidMap.tqfind( uid ); + TQMap<ulong,int>::Iterator it = uidMap.find( uid ); if( it != uidMap.end() ) { KMMsgBase *msg = getMsgBase( *it ); #if MAIL_LOSS_DEBUGGING @@ -701,7 +701,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) return 0; // There could be a problem in the maps. Rebuild them and try again reloadUidMap(); - it = uidMap.tqfind( uid ); + it = uidMap.find( uid ); if( it != uidMap.end() ) // Since the uid map is just rebuilt, no need for the sanity check return getMsgBase( *it ); @@ -1394,11 +1394,11 @@ void KMFolderCachedImap::buildSubFolderList() while( node ) { if( !node->isDir() ) { KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); - const bool folderIsNew = mNewlyCreatedSubfolders.tqcontains( TQGuardedPtr<KMFolderCachedImap>( storage ) ); + const bool folderIsNew = mNewlyCreatedSubfolders.contains( TQGuardedPtr<KMFolderCachedImap>( storage ) ); // Only sync folders that have been accepted by the server if ( !storage->imapPath().isEmpty() // and that were not just deleted from it - && !foldersForDeletionOnServer.tqcontains( storage->imapPath() ) ) { + && !foldersForDeletionOnServer.contains( storage->imapPath() ) ) { if ( mRecurse || folderIsNew ) { mSubfoldersForSync << storage; } @@ -1691,7 +1691,7 @@ bool KMFolderCachedImap::deleteMessages() TQMap<ulong,int>::const_iterator it = uidMap.constBegin(); for( ; it != uidMap.end(); it++ ) { ulong uid ( it.key() ); - if( uid!=0 && !uidsOnServer.tqfind( uid ) ) { + if( uid!=0 && !uidsOnServer.find( uid ) ) { uids << TQString::number( uid ); msgsForDeletion.append( getMsgBase( *it ) ); } @@ -1832,28 +1832,28 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & 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 > 0) { - int a = (*it).cdata.tqfind("\r\nX-uidValidity:"); + int a = (*it).cdata.find("\r\nX-uidValidity:"); if (a != -1) { - int b = (*it).cdata.tqfind("\r\n", a + 17); + int b = (*it).cdata.find("\r\n", a + 17); setUidValidity((*it).cdata.mid(a + 17, b - a - 17)); } - a = (*it).cdata.tqfind("\r\nX-Access:"); + a = (*it).cdata.find("\r\nX-Access:"); // Only trust X-Access (i.e. the imap select info) if we don't know mUserRights. // The latter is more accurate (checked on every sync) whereas X-Access is only // updated when selecting the folder again, which might not happen if using // RMB / Check Mail in this folder. We don't need two (potentially conflicting) // sources for the readonly setting, in any case. if (a != -1 && mUserRightsState != KMail::ACLJobs::Ok ) { - int b = (*it).cdata.tqfind("\r\n", a + 12); + int b = (*it).cdata.find("\r\n", a + 12); const TQString access = (*it).cdata.mid(a + 12, b - a - 12); setReadOnly( access == "Read only" ); } (*it).cdata.remove(0, pos); mFoundAnIMAPDigest = true; } - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); // Start with something largish when rebuilding the cache if ( uidsOnServer.size() == 0 ) uidsOnServer.resize( KMail::nextPrime( 2000 ) ); @@ -1869,16 +1869,16 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & // The below is optimized for speed, not prettiness. The commented out chunk // above was the solution copied from kmfolderimap, and it's 15-20% slower. const TQCString& entry( (*it).cdata ); - const int indexOfUID = entry.tqfind("X-UID", 16); + const int indexOfUID = entry.find("X-UID", 16); const int startOfUIDValue = indexOfUID + 7; - const int indexOfLength = entry.tqfind("X-Length", startOfUIDValue ); // we know length comes after UID + const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID const int startOfLengthValue = indexOfLength + 10; - const int indexOfFlags = entry.tqfind("X-Flags", startOfLengthValue ); // we know flags comes last + const int indexOfFlags = entry.find("X-Flags", startOfLengthValue ); // we know flags comes last const int startOfFlagsValue = indexOfFlags + 9; - const int flags = entry.mid( startOfFlagsValue, entry.tqfind( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); - const ulong size = entry.mid( startOfLengthValue, entry.tqfind( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); - const ulong uid = entry.mid( startOfUIDValue, entry.tqfind( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); + const int flags = entry.mid( startOfFlagsValue, entry.find( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); + const ulong size = entry.mid( startOfLengthValue, entry.find( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); + const ulong uid = entry.mid( startOfUIDValue, entry.find( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); const bool deleted = ( flags & 8 ); if ( !deleted ) { @@ -1907,7 +1907,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & kdDebug(5006) << "Looking at uid " << uid << " high water is: " << lastUid() << " we should delete it" << endl; #endif // double check we deleted it since the last sync - if ( mDeletedUIDsSinceLastSync.tqcontains(uid) ) { + if ( mDeletedUIDsSinceLastSync.contains(uid) ) { if ( mUserRightsState != KMail::ACLJobs::Ok || ( mUserRights & KMail::ACLJobs::Delete ) ) { #if MAIL_LOSS_DEBUGGING kdDebug(5006) << "message with uid " << uid << " is gone from local cache. Must be deleted on server!!!" << endl; @@ -1942,7 +1942,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & #endif // The message is new since the last sync, but we might have just uploaded it, in which case // the uid map already contains it. - if ( !uidMap.tqcontains( uid ) ) { + if ( !uidMap.contains( uid ) ) { mMsgsForDownload << KMail::CachedImapJob::MsgForDownload(uid, flags, size); if( imapPath() == "/INBOX/" ) mUidsForDownload << uid; @@ -1958,7 +1958,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); } } @@ -2184,7 +2184,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, if (!node->isDir() ) { KMFolderCachedImap *f = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); - if ( mSubfolderNames.tqfindIndex(node->name()) == -1 ) { + if ( mSubfolderNames.findIndex(node->name()) == -1 ) { TQString name = node->name(); // as more than one namespace can be listed in the root folder we need to make sure // that the folder is within the current namespace @@ -2207,7 +2207,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, /** * Store the folder attributes for every subfolder. */ - int index = mSubfolderNames.tqfindIndex( node->name() ); + int index = mSubfolderNames.findIndex( node->name() ); f->mFolderAttributes = folderAttributes[ index ]; } } else { @@ -2669,7 +2669,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() { TQString oldType = mAnnotationFolderType; TQString oldSubType; - int dot = oldType.tqfind( '.' ); + int dot = oldType.find( '.' ); if ( dot != -1 ) { oldType.truncate( dot ); oldSubType = mAnnotationFolderType.mid( dot + 1 ); @@ -2728,7 +2728,7 @@ void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQStr if ( found ) { TQString type = value; TQString subtype; - int dot = value.tqfind( '.' ); + int dot = value.find( '.' ); if ( dot != -1 ) { type.truncate( dot ); subtype = value.mid( dot + 1 ); @@ -2852,11 +2852,11 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl; // we're only interested in the main type TQString type(annotation); - int dot = annotation.tqfind( '.' ); + int dot = annotation.find( '.' ); if ( dot != -1 ) type.truncate( dot ); type = type.simplifyWhiteSpace(); - const int idx = mSubfolderPaths.tqfindIndex( folderPath ); + const int idx = mSubfolderPaths.findIndex( folderPath ); const bool isNoContent = mSubfolderMimeTypes[idx] == "inode/directory"; if ( ( isNoContent && type.isEmpty() ) || ( !type.isEmpty() && type != KMailICalIfaceImpl::annotationForContentsType( ContentsTypeMail ) ) ) { |