diff options
Diffstat (limited to 'kmail')
112 files changed, 706 insertions, 706 deletions
diff --git a/kmail/Mainpage.dox b/kmail/Mainpage.dox index b1355c121..ab2391090 100644 --- a/kmail/Mainpage.dox +++ b/kmail/Mainpage.dox @@ -271,7 +271,7 @@ accessed via KMKernel ( the "kmkernel" construct ). Those methods are : folder manager. In dimap, both the headers and a copy of the full message are cached locally. 4) KMFolderMgr *searchFolderMgr() - which returns the folder manager - for search folders (folders created by using the "tqfind + for search folders (folders created by using the "find messages" tool). Other email clients call this type of folder "virtual folders". diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp index 2782bfa93..de168cebb 100644 --- a/kmail/accountdialog.cpp +++ b/kmail/accountdialog.cpp @@ -133,7 +133,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) int commentPos = -1; - if( (commentPos = s.tqfind('#')) > -1 ) { + if( (commentPos = s.find('#')) > -1 ) { // get rid of trailing comment s.truncate(commentPos); s = s.stripWhiteSpace(); @@ -143,7 +143,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) processGlobalLock(s); } else if( lockFileLocal.search(s) != -1 ) { processLocalLock(s); - } else if( int i = s.tqfind('=') ) { + } else if( int i = s.find('=') ) { processVariableSetting(s,i); } } @@ -156,11 +156,11 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) default_Location += '/'; default_Location += getenv("USER"); } - if ( !mSpoolFiles.tqcontains(default_Location) ) + if ( !mSpoolFiles.contains(default_Location) ) mSpoolFiles << default_Location; default_Location = default_Location + ".lock"; - if ( !mLockFiles.tqcontains(default_Location) ) + if ( !mLockFiles.contains(default_Location) ) mLockFiles << default_Location; } @@ -172,8 +172,8 @@ ProcmailRCParser::~ProcmailRCParser() void ProcmailRCParser::processGlobalLock(const TQString &s) { - TQString val = expandVars(s.mid(s.tqfind('=') + 1).stripWhiteSpace()); - if ( !mLockFiles.tqcontains(val) ) + TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace()); + if ( !mLockFiles.contains(val) ) mLockFiles << val; } @@ -181,7 +181,7 @@ void ProcmailRCParser::processLocalLock(const TQString &s) { TQString val; - int colonPos = s.tqfindRev(':'); + int colonPos = s.findRev(':'); if (colonPos > 0) { // we don't care about the leading one val = s.mid(colonPos + 1).stripWhiteSpace(); @@ -190,7 +190,7 @@ ProcmailRCParser::processLocalLock(const TQString &s) // user specified a lockfile, so process it // val = expandVars(val); - if( val[0] != '/' && mVars.tqfind("MAILDIR") ) + if( val[0] != '/' && mVars.find("MAILDIR") ) val.insert(0, *(mVars["MAILDIR"]) + '/'); } // else we'll deduce the lockfile name one we // get the spoolfile name @@ -211,11 +211,11 @@ ProcmailRCParser::processLocalLock(const TQString &s) line = expandVars(line); // prepend default MAILDIR if needed - if( line[0] != '/' && mVars.tqfind("MAILDIR") ) + if( line[0] != '/' && mVars.find("MAILDIR") ) line.insert(0, *(mVars["MAILDIR"]) + '/'); // now we have the spoolfile name - if ( !mSpoolFiles.tqcontains(line) ) + if ( !mSpoolFiles.contains(line) ) mSpoolFiles << line; if( colonPos > 0 && (!val || val.isEmpty()) ) { @@ -224,13 +224,13 @@ ProcmailRCParser::processLocalLock(const TQString &s) val = line; // append lock extension - if( mVars.tqfind("LOCKEXT") ) + if( mVars.find("LOCKEXT") ) val += *(mVars["LOCKEXT"]); else val += ".lock"; } - if ( !val.isNull() && !mLockFiles.tqcontains(val) ) { + if ( !val.isNull() && !mLockFiles.contains(val) ) { mLockFiles << val; } } @@ -258,7 +258,7 @@ ProcmailRCParser::expandVars(const TQString &s) TQAsciiDictIterator<TQString> it( mVars ); // iterator for dict while ( it.current() ) { - expS.tqreplace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); + expS.replace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); ++it; } @@ -806,7 +806,7 @@ void AccountDialog::makePopAccountPage() mPop.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" ); mPop.authNTLM = new TQRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" ); mPop.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" ); - if ( KProtocolInfo::capabilities("pop3").tqcontains("SASL") == 0 ) + if ( KProtocolInfo::capabilities("pop3").contains("SASL") == 0 ) { mPop.authNTLM->hide(); mPop.authGSSAPI->hide(); @@ -1764,7 +1764,7 @@ void AccountDialog::checkHighest( TQButtonGroup *btnGroup ) { kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl; for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind( i ); + TQButton * btn = btnGroup->find( i ); if ( btn && btn->isEnabled() ) { btn->animateClick(); return; @@ -1972,7 +1972,7 @@ void AccountDialog::saveSettings() // get the new account and register the new destination folder // this is the target folder for local or pop accounts and the root folder // of the account for (d)imap - KMAccount* newAcct = kmkernel->acctMgr()->tqfind(mAccount->id()); + KMAccount* newAcct = kmkernel->acctMgr()->find(mAccount->id()); if (newAcct) { if( accountType == "local" ) { @@ -2298,7 +2298,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, mBg = new TQButtonGroup( 0 ); connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) ); - mDelimMap = mNamespaceMap->tqfind( mType ).data(); + mDelimMap = mNamespaceMap->find( mType ).data(); ImapAccountBase::namespaceDelim::Iterator it; for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) { NamespaceLineEdit* edit = new NamespaceLineEdit( grid ); @@ -2315,7 +2315,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, void NamespaceEditDialog::slotRemoveEntry( int id ) { - if ( mLineEditMap.tqcontains( id ) ) { + if ( mLineEditMap.contains( id ) ) { // delete the lineedit and remove namespace from map NamespaceLineEdit* edit = mLineEditMap[id]; mDelimMap.remove( edit->text() ); @@ -2325,9 +2325,9 @@ void NamespaceEditDialog::slotRemoveEntry( int id ) mLineEditMap.remove( id ); delete edit; } - if ( mBg->tqfind( id ) ) { + if ( mBg->find( id ) ) { // delete the button - delete mBg->tqfind( id ); + delete mBg->find( id ); } adjustSize(); } @@ -2343,7 +2343,7 @@ void NamespaceEditDialog::slotOk() mDelimMap.remove( edit->lastText() ); } } - mNamespaceMap->tqreplace( mType, mDelimMap ); + mNamespaceMap->replace( mType, mDelimMap ); KDialogBase::slotOk(); } diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index 9340e774d..21a9f8cdc 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -293,7 +293,7 @@ KMAccount* AccountManager::findByName(const TQString &aName) const //----------------------------------------------------------------------------- -KMAccount* AccountManager::tqfind( const uint id ) const +KMAccount* AccountManager::find( const uint id ) const { if (id == 0) return 0; for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) { @@ -397,7 +397,7 @@ void AccountManager::addToTotalNewMailCount( const TQMap<TQString, int> & newInF for ( TQMap<TQString, int>::const_iterator it = newInFolder.begin(); it != newInFolder.end(); ++it ) { mTotalNewMailsArrived += it.data(); - if ( mTotalNewInFolder.tqfind( it.key() ) == mTotalNewInFolder.end() ) + if ( mTotalNewInFolder.find( it.key() ) == mTotalNewInFolder.end() ) mTotalNewInFolder[it.key()] = it.data(); else mTotalNewInFolder[it.key()] += it.data(); @@ -417,7 +417,7 @@ uint AccountManager::createId() do { newId = kapp->random(); - } while ( usedIds.tqfind(newId) != usedIds.end() ); + } while ( usedIds.find(newId) != usedIds.end() ); return newId; } diff --git a/kmail/accountmanager.h b/kmail/accountmanager.h index 2fac30c36..f8a8079f7 100644 --- a/kmail/accountmanager.h +++ b/kmail/accountmanager.h @@ -65,7 +65,7 @@ public: /** Find account by id. Returns 0 if account does not exist. */ - KMAccount* tqfind( const uint id ) const; + KMAccount* find( const uint id ) const; /** Physically remove account. Also deletes the given account object ! Returns FALSE and does nothing if the account cannot be removed. */ diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp index 0ae07d6c1..be69edd0f 100644 --- a/kmail/accountwizard.cpp +++ b/kmail/accountwizard.cpp @@ -153,7 +153,7 @@ void AccountWizard::showPage( TQWidget *page ) if ( mLoginName->text().isEmpty() ) { // try to extract login from email address TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) mLoginName->setText( email.left( pos ) ); @@ -329,7 +329,7 @@ TQString AccountWizard::accountName() const TQString name( i18n( "None" ) ); TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) { name = email.mid( pos + 1 ); name[ 0 ] = name[ 0 ].upper(); @@ -652,7 +652,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) authBitsNone = authMethodsFromStringList( capaNormal ); - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) authBitsTLS = authBitsNone; else authBitsTLS = 0; @@ -664,7 +664,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, } uint authBits = 0; - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) { + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) { mTransportInfo->encryption = "TLS"; authBits = authBitsTLS; } else if ( !capaSSL.isEmpty() ) { diff --git a/kmail/actionscheduler.cpp b/kmail/actionscheduler.cpp index 3d1c86880..913245e99 100644 --- a/kmail/actionscheduler.cpp +++ b/kmail/actionscheduler.cpp @@ -462,7 +462,7 @@ void ActionScheduler::messageFetched( KMMessage *msg ) fetchMessageTimer->start( 0, true ); } if (mFetchUnget && msg->tqparent()) - msg->tqparent()->unGetMsg( msg->tqparent()->tqfind( msg )); + msg->tqparent()->unGetMsg( msg->tqparent()->find( msg )); return; } @@ -667,7 +667,7 @@ void ActionScheduler::moveMessage() mResult = mOldReturnCode; // ignore errors in deleting original message if (!orgMsg || !orgMsg->tqparent()) { // Original message is gone, no point filtering it anymore - mSrcFolder->removeMsg( mSrcFolder->tqfind( msg ) ); + mSrcFolder->removeMsg( mSrcFolder->find( msg ) ); kdDebug(5006) << "The original serial number is missing. " << "Cannot complete the filtering." << endl; mExecutingLock = false; @@ -680,7 +680,7 @@ void ActionScheduler::moveMessage() mIgnore = true; assert( msg->tqparent() == mSrcFolder.operator->() ); - mSrcFolder->take( mSrcFolder->tqfind( msg ) ); + mSrcFolder->take( mSrcFolder->find( msg ) ); mSrcFolder->addMsg( msg ); mIgnore = false; @@ -790,7 +790,7 @@ TQString ActionScheduler::debug() if ((*it)->mAccount && kmkernel->find( (*it)->mAccountId )) { res.append( TQString( "Account %1, Name %2.\n" ) .tqarg( (*it)->mAccountId ) - .tqarg( kmkernel->acctMgr()->tqfind( (*it)->mAccountId )->name() ) ); + .tqarg( kmkernel->acctMgr()->find( (*it)->mAccountId )->name() ) ); } res.append( TQString( "mExecuting %1, " ).tqarg( (*it)->mExecuting ? "true" : "false" ) ); res.append( TQString( "mExecutingLock %1, " ).tqarg( (*it)->mExecutingLock ? "true" : "false" ) ); diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp index 19198e11a..500529953 100644 --- a/kmail/antispamconfig.cpp +++ b/kmail/antispamconfig.cpp @@ -89,7 +89,7 @@ const SpamAgents AntiSpamConfig::uniqueAgents() const SpamAgents::ConstIterator end( mAgents.end() ); for ( ; it != end ; ++it ) { const TQString agent( ( *it ).name() ); - if ( seenAgents.tqfind( agent ) == seenAgents.end() ) { + if ( seenAgents.find( agent ) == seenAgents.end() ) { agents.append( *it ); seenAgents.append( agent ); } diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index 1e5e912b8..dccca6a89 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -505,9 +505,9 @@ void AntiSpamWizard::checkToolAvailability() AccountManager* mgr = kmkernel->acctMgr(); KMAccount* account = mgr->first(); while ( account ) { - if ( account->type() == "pop" || account->type().tqcontains( "imap" ) ) { + if ( account->type() == "pop" || account->type().contains( "imap" ) ) { const NetworkAccount * n = dynamic_cast<const NetworkAccount*>( account ); - if ( n && n->host().lower().tqcontains( pattern.lower() ) ) { + if ( n && n->host().lower().contains( pattern.lower() ) ) { mInfoPage->addAvailableTool( (*it).getVisibleName() ); found = true; } @@ -925,7 +925,7 @@ void ASWizInfoPage::addAvailableTool( const TQString &visibleName ) bool ASWizInfoPage::isProgramSelected( const TQString &visibleName ) { TQString listName = visibleName; - return mToolsList->isSelected( mToolsList->tqfindItem( listName ) ); + return mToolsList->isSelected( mToolsList->findItem( listName ) ); } diff --git a/kmail/archivefolderdialog.cpp b/kmail/archivefolderdialog.cpp index b1422f476..f6cfac629 100644 --- a/kmail/archivefolderdialog.cpp +++ b/kmail/archivefolderdialog.cpp @@ -194,7 +194,7 @@ void ArchiveFolderDialog::slotFixFileExtension() // First, try to find the extension of the file name and remove it for( int i = 0; i < numExtensions; i++ ) { - int index = fileName.lower().tqfindRev( sortedExtensions[i] ); + int index = fileName.lower().findRev( sortedExtensions[i] ); if ( index != -1 ) { fileName = fileName.left( fileName.length() - TQString( sortedExtensions[i] ).length() ); break; diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp index a4520f3c7..8a40d7443 100644 --- a/kmail/bodyvisitor.cpp +++ b/kmail/bodyvisitor.cpp @@ -78,11 +78,11 @@ namespace KMail { ++it; // skip this part if the tqparent part is already loading if ( part->tqparent() && - selected.tqcontains( part->tqparent() ) && + selected.contains( part->tqparent() ) && part->loadPart() ) continue; - if ( part->originalContentTypeStr().tqcontains("SIGNED") ) + if ( part->originalContentTypeStr().contains("SIGNED") ) { // signed messages have to be loaded completely // so construct a new dummy part that loads the body @@ -115,7 +115,7 @@ namespace KMail { // check whether to load this part or not: // look at the basic list, ask the subclass and check the tqparent - if ( mBasicList.tqcontains( part->originalContentTypeStr() ) || + if ( mBasicList.contains( part->originalContentTypeStr() ) || parentNeedsLoading( part ) || addPartToList( part ) ) { diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp index 968529beb..d13382511 100644 --- a/kmail/cachedimapjob.cpp +++ b/kmail/cachedimapjob.cpp @@ -401,10 +401,10 @@ void CachedImapJob::slotPutNextMessage() mMsg->setUID( 0 ); // for the index TQCString cstr(mMsg->asString()); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - TQCString mData(cstr.length() + cstr.tqcontains('\n')); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + TQCString mData(cstr.length() + cstr.contains('\n')); unsigned int i = 0; for( char *ch = cstr.data(); *ch; ch++ ) { if ( *ch == '\n' ) { @@ -462,7 +462,7 @@ void CachedImapJob::slotPutMessageInfoData( KIO::Job *job, const TQString &data return; } - if ( data.tqfind( "UID" ) != -1 && mMsg ) { + if ( data.find( "UID" ) != -1 && mMsg ) { int uid = ( data.right( data.length() - 4 ) ).toInt(); kdDebug( 5006 ) << k_funcinfo << "Server told us uid is: " << uid << endl; mMsg->setUID( uid ); @@ -498,7 +498,7 @@ void CachedImapJob::slotPutMessageResult(KIO::Job *job) emit progress( mSentBytes, mTotalBytes ); int i; - if( ( i = mFolder->tqfind(mMsg) ) != -1 ) { + if( ( i = mFolder->find(mMsg) ) != -1 ) { /* * If we have aquired a uid during upload the server supports the uidnext * extension and there is no need to redownload this mail, we already have @@ -686,7 +686,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) // Check the uidValidity TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.tqfind("X-uidValidity: "); + int a = cstr.find("X-uidValidity: "); if (a < 0) { // Something is seriously rotten here! // TODO: Tell the user that he has a problem @@ -694,7 +694,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } else { - int b = cstr.tqfind("\r\n", a); + int b = cstr.find("\r\n", a); if ( (b - a - 15) >= 0 ) { TQString uidv = cstr.mid(a + 15, b - a - 15); // kdDebug(5006) << "New uidv = " << uidv << ", old uidv = " @@ -711,11 +711,11 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } - a = cstr.tqfind( "X-PermanentFlags: " ); + a = cstr.find( "X-PermanentFlags: " ); if ( a < 0 ) { kdDebug(5006) << "no PERMANENTFLAGS response? assumming custom flags are not available" << endl; } else { - int b = cstr.tqfind( "\r\n", a ); + int b = cstr.find( "\r\n", a ); if ( (b - a - 18) >= 0 ) { int flags = cstr.mid( a + 18, b - a - 18 ).toInt(); emit permanentFlags( flags ); @@ -767,7 +767,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); if ( !imapFolder->imapPath().isEmpty() ) // Only rename folders that have been accepted by the server - if( imapFolder->imapPath().tqfind( oldPath ) == 0 ) { + if( imapFolder->imapPath().find( oldPath ) == 0 ) { TQString p = imapFolder->imapPath(); p = p.mid( oldPath.length() ); p.prepend( newPath ); @@ -782,7 +782,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, void CachedImapJob::revertLabelChange() { - TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().tqfind( mFolder->imapPath() ); + TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); Q_ASSERT( renit != mAccount->renamedFolders().end() ); if ( renit != mAccount->renamedFolders().end() ) { mFolder->folder()->setLabel( (*renit).mOldLabel ); diff --git a/kmail/callback.cpp b/kmail/callback.cpp index 923ff6be3..0b94a5d1f 100644 --- a/kmail/callback.cpp +++ b/kmail/callback.cpp @@ -64,7 +64,7 @@ TQString Callback::askForTransport( bool nullIdentity ) const return transports.first(); const TQString defaultTransport = GlobalSettings::self()->defaultTransport(); - const int defaultIndex = TQMAX( 0, transports.tqfindIndex( defaultTransport ) ); + const int defaultIndex = TQMAX( 0, transports.findIndex( defaultTransport ) ); TQString text; if ( nullIdentity ) @@ -94,13 +94,13 @@ bool Callback::mailICal( const TQString& to, const TQString &iCal, msg->setSubject( subject ); if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) { if ( status == TQString("cancel") ) - msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("tentative") ) - msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("accepted") ) - msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("delegated") ) - msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).replace("Answer: ","") ); } msg->setTo( to ); msg->setFrom( receiver() ); @@ -227,7 +227,7 @@ TQString Callback::receiver() const // select default identity by default const TQString defaultAddr = kmkernel->identityManager()->defaultIdentity().primaryEmailAddress(); - const int defaultIndex = TQMAX( 0, addrs.tqfindIndex( defaultAddr ) ); + const int defaultIndex = TQMAX( 0, addrs.findIndex( defaultAddr ) ); mReceiver = KInputDialog::getItem( i18n( "Select Address" ), diff --git a/kmail/chiasmuskeyselector.cpp b/kmail/chiasmuskeyselector.cpp index 9fde31bb9..d88c3164b 100644 --- a/kmail/chiasmuskeyselector.cpp +++ b/kmail/chiasmuskeyselector.cpp @@ -21,7 +21,7 @@ ChiasmusKeySelector::ChiasmusKeySelector( TQWidget* tqparent, const TQString& ca mListBox = new KListBox( page ); mListBox->insertStringList( keys ); - const int current = keys.tqfindIndex( currentKey ); + const int current = keys.findIndex( currentKey ); mListBox->setSelected( TQMAX( 0, current ), true ); mListBox->ensureCurrentVisible(); tqlayout->addWidget( mListBox, 1 ); diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index e1fa08985..c0d775cf2 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -480,7 +480,7 @@ void IdentityPage::slotRenameIdentity( TQListViewItem * i, TQString newName = s.stripWhiteSpace(); if ( !newName.isEmpty() && - !kmkernel->identityManager()->shadowIdentities().tqcontains( newName ) ) { + !kmkernel->identityManager()->shadowIdentities().contains( newName ) ) { KPIM::Identity & ident = item->identity(); ident.setIdentityName( newName ); emit changed(true); @@ -739,7 +739,7 @@ static inline TQString uniqueName( const TQStringList & list, { int suffix = 1; TQString result = name; - while ( list.tqfind( result ) != list.end() ) { + while ( list.find( result ) != list.end() ) { result = i18n("%1: name; %2: number appended to it to make it unique " "among a list of names", "%1 %2") .tqarg( name ).tqarg( suffix ); @@ -2057,7 +2057,7 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( TQWidget * tqparent, const c for ( int i = 0 ; i < numDateDisplayConfig ; i++ ) { TQString buttonLabel = i18n(dateDisplayConfig[i].displayName); - if ( buttonLabel.tqcontains("%1") ) + if ( buttonLabel.contains("%1") ) buttonLabel = buttonLabel.tqarg( DateFormatter::formatCurrentDate( dateDisplayConfig[i].dateDisplay ) ); radio = new TQRadioButton( buttonLabel, mDateDisplay ); mDateDisplay->insert( radio, i ); @@ -2367,7 +2367,7 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec() TQStringList::ConstIterator it( encodings.begin() ); TQStringList::ConstIterator end( encodings.end() ); TQString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding(); - currentEncoding = currentEncoding.tqreplace( "iso ", "iso-", false ); + currentEncoding = currentEncoding.replace( "iso ", "iso-", false ); ///kdDebug(5006) << "Looking for encoding: " << currentEncoding << endl; int i = 0; int indexOfLatin9 = 0; @@ -3203,7 +3203,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mReplyListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 2: "tqreplace [...]" check box: + // row 2: "replace [...]" check box: mReplaceReplyPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceReplyPrefixItem()->label(), group, "kcfg_ReplaceReplyPrefix" ); @@ -3231,7 +3231,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mForwardListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 3: "tqreplace [...]" check box: + // row 3: "replace [...]" check box: mReplaceForwardPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceForwardPrefixItem()->label(), group, "kcfg_ReplaceForwardPrefix" ); @@ -3855,7 +3855,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( TQWidget * tqparent, const char mMDNGroup->insert( radio ); for ( int i = 0 ; i < mMDNGroup->count() ; ++i ) - TQWhatsThis::add( mMDNGroup->tqfind( i ), receiptWhatsThis ); + TQWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis ); w = new TQWidget( hbox ); // spacer hbox->setStretchFactor( w, 1 ); @@ -5051,7 +5051,7 @@ void MiscPage::GroupwareTab::doLoadFromGlobalSettings() { KMAccount* selectedAccount = 0; int accountId = GlobalSettings::self()->theIMAPResourceAccount(); if ( accountId ) - selectedAccount = kmkernel->acctMgr()->tqfind( accountId ); + selectedAccount = kmkernel->acctMgr()->find( accountId ); else { // Fallback: iterate over accounts to select folderId if found (as an inbox folder) for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0; diff --git a/kmail/configuredialog_p.cpp b/kmail/configuredialog_p.cpp index a6705c76b..7a8820236 100644 --- a/kmail/configuredialog_p.cpp +++ b/kmail/configuredialog_p.cpp @@ -222,7 +222,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, // we extract it from the path: "/prefix/de/entry.desktop" -> "de" TQString acronym = (*it).section( '/', -2, -2 ); - if ( suppressedAcronyms.tqfind( acronym ) == suppressedAcronyms.end() ) { + if ( suppressedAcronyms.find( acronym ) == suppressedAcronyms.end() ) { // not found: TQString displayname = TQString::tqfromLatin1("%1 (%2)") .tqarg( name ).tqarg( acronym ); @@ -239,7 +239,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, TQString NewLanguageDialog::language() const { TQString s = mComboBox->currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -257,13 +257,13 @@ int LanguageComboBox::insertLanguage( const TQString & language ) TQString name = entry.readEntry( "Name" ); TQString output = TQString::tqfromLatin1("%1 (%2)").tqarg( name ).tqarg( language ); insertItem( TQPixmap( locate("locale", language + flagPng ) ), output ); - return listBox()->index( listBox()->tqfindItem(output) ); + return listBox()->index( listBox()->findItem(output) ); } TQString LanguageComboBox::language() const { TQString s = currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -272,7 +272,7 @@ void LanguageComboBox::setLanguage( const TQString & language ) TQString parenthizedLanguage = TQString::tqfromLatin1("(%1)").tqarg( language ); for (int i = 0; i < count(); i++) // ### FIXME: use .endWith(): - if ( text(i).tqfind( parenthizedLanguage ) >= 0 ) { + if ( text(i).find( parenthizedLanguage ) >= 0 ) { setCurrentItem(i); return; } diff --git a/kmail/encodingdetector.cpp b/kmail/encodingdetector.cpp index cc19e3b1e..06537981b 100644 --- a/kmail/encodingdetector.cpp +++ b/kmail/encodingdetector.cpp @@ -51,7 +51,7 @@ // Multiple scripts per language were removed and the entries were reordered so // that simple substring matching will work. For example, bam was put before ba // so that the first match will be likely the right match. Otherwise "ba" would -// match "bam" but we would have to search on to tqfind "bam" which is what we want. +// match "bam" but we would have to search on to find "bam" which is what we want. // The original file is called pango-script-lang-table.h /* pango-script-lang-table.h: @@ -824,7 +824,7 @@ EncodingDetector::EncodingChoiceSource EncodingDetector::encodingChoiceSource() const char* EncodingDetector::encoding() const { d->m_storeDecoderName = d->m_codec->name(); - d->m_storeDecoderName = d->m_storeDecoderName.lower().tqreplace( "iso ", "iso-" ); + d->m_storeDecoderName = d->m_storeDecoderName.lower().replace( "iso ", "iso-" ); return d->m_storeDecoderName.data(); } @@ -1059,13 +1059,13 @@ bool EncodingDetector::analyze(const char *data, int len) TQCString str( ptr, (end-ptr)+1); str = str.lower(); int pos=0; - //if( (pos = str.tqfind("http-equiv", pos)) == -1) break; - //if( (pos = str.tqfind("content-type", pos)) == -1) break; - if( (pos = str.tqfind("charset")) == -1) + //if( (pos = str.find("http-equiv", pos)) == -1) break; + //if( (pos = str.find("content-type", pos)) == -1) break; + if( (pos = str.find("charset")) == -1) continue; pos+=6; // skip to '=' - if( (pos = str.tqfind('=', pos)) == -1) + if( (pos = str.find('=', pos)) == -1) continue; // skip whitespace before encoding itself diff --git a/kmail/favoritefolderview.cpp b/kmail/favoritefolderview.cpp index 5c5cfa66f..9de9271ef 100644 --- a/kmail/favoritefolderview.cpp +++ b/kmail/favoritefolderview.cpp @@ -74,7 +74,7 @@ FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * tqparent, co void FavoriteFolderViewItem::nameChanged() { TQString txt = text( 0 ); - txt.tqreplace( mOldName, folder()->label() ); + txt.replace( mOldName, folder()->label() ); setText( 0, txt ); mOldName = folder()->label(); } @@ -309,7 +309,7 @@ void FavoriteFolderView::dropped(TQDropEvent * e, TQListViewItem * after) KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); if ( !fti->folder() ) continue; - if( !mFolderToItem.tqcontains( fti->folder() ) ) + if( !mFolderToItem.contains( fti->folder() ) ) afterItem = addFolder( fti->folder(), prettyName( fti ), afterItem ); } e->accept(); @@ -369,7 +369,7 @@ void FavoriteFolderView::initializeFavorites() assert( ft ); for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); - if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.tqcontains( fti->folder()->id() ) ) { + if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.contains( fti->folder()->id() ) ) { seenInboxes.append( fti->folder()->id() ); if ( fti->folder() == kmkernel->inboxFolder() && hideLocalInbox() ) continue; @@ -457,7 +457,7 @@ void FavoriteFolderView::addFolder() KMFolder *folder = dlg.folder(); if ( !folder ) return; - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return; KMFolderTreeItem *fti = findFolderTreeItem( folder ); @@ -468,7 +468,7 @@ void KMail::FavoriteFolderView::addFolder(KMFolderTreeItem * fti) { if ( !fti || !fti->folder() ) return; - if ( !mFolderToItem.tqcontains( fti->folder() ) ) + if ( !mFolderToItem.contains( fti->folder() ) ) addFolder( fti->folder(), prettyName( fti ) ); } diff --git a/kmail/folderIface.cpp b/kmail/folderIface.cpp index 4d1cb8089..bcd4201f7 100644 --- a/kmail/folderIface.cpp +++ b/kmail/folderIface.cpp @@ -136,7 +136,7 @@ FolderIface::messageRefs() for( int i = 0; i < messageCache.size(); ++i ) { KMMsgBase *msg = messageCache[i]; if ( msg ) { - KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->tqfind( msg ) ); + KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->find( msg ) ); refList.append( DCOPRef( new MessageIface( fmsg ) ) ); } } diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp index 5237787ea..3b64254c5 100644 --- a/kmail/folderdiaacltab.cpp +++ b/kmail/folderdiaacltab.cpp @@ -139,7 +139,7 @@ static TQString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat if ( userIdFormat == FullEmail ) return email; else { // mUserIdFormat == UserName - email.truncate( email.tqfind( '@' ) ); + email.truncate( email.find( '@' ) ); return email; } } @@ -259,7 +259,7 @@ void KMail::FolderDiaACLTab::ListViewItem::load( const ACLListEntry& entry ) // since it uses space as a separator (imap4.cc, look for GETACL) // It's ok in distribution list names though, that's why this check is only done here // and also why there's no validator on the lineedit. - if ( entry.userId.tqcontains( ' ' ) ) + if ( entry.userId.contains( ' ' ) ) kdWarning(5006) << "Userid contains a space!!! '" << entry.userId << "'" << endl; setUserId( entry.userId ); @@ -412,7 +412,7 @@ void KMail::FolderDiaACLTab::load() // but the default value is determined from the current user's own id. TQString defaultFormat = "fullemail"; // warning mImapAccount can be 0 if creating a subsubsubfolder with dimap... (bug?) - if ( mImapAccount && mImapAccount->login().tqfind('@') == -1 ) + if ( mImapAccount && mImapAccount->login().find('@') == -1 ) defaultFormat = "username"; // no @ found, so we assume it's just the username KConfigGroup configGroup( kmkernel->config(), "IMAP" ); TQString str = configGroup.readEntry( "UserIdFormat", defaultFormat ); @@ -699,7 +699,7 @@ bool KMail::FolderDiaACLTab::save() TQString uid = (*init).userId; for( ACLList::ConstIterator it = aclList.begin(); it != aclList.end() && !isInNewList; ++it ) isInNewList = uid == (*it).userId; - if ( !isInNewList && !mRemovedACLs.tqcontains(uid) ) + if ( !isInNewList && !mRemovedACLs.contains(uid) ) mRemovedACLs.append( uid ); } diff --git a/kmail/folderjob.h b/kmail/folderjob.h index 3d662e76d..52778bb68 100644 --- a/kmail/folderjob.h +++ b/kmail/folderjob.h @@ -128,7 +128,7 @@ signals: /** * Emitted when a list of messages has been - * copied to the specified location. TQPtrList tqcontains + * copied to the specified location. TQPtrList contains * the list of the copied messages. */ void messageCopied( TQPtrList<KMMessage> ); diff --git a/kmail/foldersetselector.cpp b/kmail/foldersetselector.cpp index 45748b2f6..8ae2618ec 100644 --- a/kmail/foldersetselector.cpp +++ b/kmail/foldersetselector.cpp @@ -76,7 +76,7 @@ void FolderSetSelector::setSelectedFolders(const TQValueList< int > & folderIds) while ( it.current() ) { SimpleFolderTreeItem<TQCheckListItem> *item = dynamic_cast<SimpleFolderTreeItem<TQCheckListItem>*>( it.current() ); if ( item && item->folder() ) { - if ( folderIds.tqcontains( item->folder()->id() ) ) + if ( folderIds.contains( item->folder()->id() ) ) item->setOn( true ); else item->setOn( false ); diff --git a/kmail/folderstorage.cpp b/kmail/folderstorage.cpp index 469f03f11..25fc6c0f0 100644 --- a/kmail/folderstorage.cpp +++ b/kmail/folderstorage.cpp @@ -113,7 +113,7 @@ void FolderStorage::close( const char* owner, bool aForced ) TQString FolderStorage::dotEscape(const TQString& aStr) { if (aStr[0] != '.') return aStr; - return aStr.left(aStr.tqfind(TQRegExp("[^\\.]"))) + aStr; + return aStr.left(aStr.find(TQRegExp("[^\\.]"))) + aStr; } void FolderStorage::addJob( FolderJob* job ) const @@ -350,8 +350,8 @@ void FolderStorage::reallyAddCopyOfMsg(KMMessage* aMsg) unGetMsg( count() - 1 ); } -int FolderStorage::tqfind( const KMMessage * msg ) const { - return tqfind( &msg->toMsgBase() ); +int FolderStorage::find( const KMMessage * msg ) const { + return find( &msg->toMsgBase() ); } //----------------------------------------------------------------------------- @@ -359,7 +359,7 @@ void FolderStorage::removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuie { for( TQPtrListIterator<KMMsgBase> it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -370,7 +370,7 @@ void FolderStorage::removeMsg(const TQPtrList<KMMessage>& msgList, bool imapQuie { for( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -465,7 +465,7 @@ void FolderStorage::take(TQPtrList<KMMessage> msgList) { if (msg->tqparent()) { - int idx = msg->tqparent()->tqfind(msg); + int idx = msg->tqparent()->find(msg); if ( idx >= 0 ) take(idx); } @@ -725,11 +725,11 @@ int FolderStorage::rename(const TQString& newName, KMFolderDir *newParent) // if the folder is being moved then move its node and, if necessary, also // the associated subfolder directory node to the new tqparent if (newParent) { - if (oldParent->tqfindRef( folder() ) != -1) + if (oldParent->findRef( folder() ) != -1) oldParent->take(); newParent->inSort( folder() ); if ( child ) { - if ( child->tqparent()->tqfindRef( child ) != -1 ) + if ( child->tqparent()->findRef( child ) != -1 ) child->tqparent()->take(); newParent->inSort( child ); child->setParent( newParent ); @@ -898,7 +898,7 @@ void FolderStorage::msgStatusChanged(const KMMsgtqStatus oldtqStatus, void FolderStorage::headerOfMsgChanged(const KMMsgBase* aMsg, int idx) { if (idx < 0) - idx = aMsg->tqparent()->tqfind( aMsg ); + idx = aMsg->tqparent()->find( aMsg ); if (idx >= 0 ) { @@ -1025,7 +1025,7 @@ int FolderStorage::appendToFolderIdsFile( int idx ) void FolderStorage::replaceMsgSerNum( unsigned long sernum, KMMsgBase* msg, int idx ) { if ( !mExportsSernums ) return; - KMMsgDict::mutableInstance()->tqreplace( sernum, msg, idx ); + KMMsgDict::mutableInstance()->replace( sernum, msg, idx ); } void FolderStorage::setRDict( KMMsgDictREntry *rentry ) const diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h index 9ff0b67f0..45a402820 100644 --- a/kmail/folderstorage.h +++ b/kmail/folderstorage.h @@ -229,8 +229,8 @@ public: virtual int moveMsg(TQPtrList<KMMessage>, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - virtual int tqfind(const KMMsgBase* msg) const = 0; - int tqfind( const KMMessage * msg ) const; + virtual int find(const KMMsgBase* msg) const = 0; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ virtual int count(bool cache = false) const; diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h index 710186637..b2c48c705 100644 --- a/kmail/foldertreebase.h +++ b/kmail/foldertreebase.h @@ -39,7 +39,7 @@ class FolderTreeBase : public KFolderTree /** Find index of given folder. Returns 0 if not found */ virtual TQListViewItem* indexOfFolder( const KMFolder* folder ) const { - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return mFolderToItem[ folder ]; else return 0; diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h index a60e60c6c..5846cd82d 100644 --- a/kmail/folderviewtooltip.h +++ b/kmail/folderviewtooltip.h @@ -32,7 +32,7 @@ class FolderViewToolTip : public TQToolTip item->updateCount(); TQString tipText = i18n("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>Size: %4" ) - .tqarg( item->folder()->prettyURL().tqreplace( " ", " " ) ) + .tqarg( item->folder()->prettyURL().replace( " ", " " ) ) .tqarg( item->totalCount() < 0 ? "-" : TQString::number( item->totalCount() ) ) .tqarg( item->unreadCount() < 0 ? "-" : TQString::number( item->unreadCount() ) ) .tqarg( KIO::convertSize( item->folderSize() ) ); diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index 67755effa..605e86f81 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -89,7 +89,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *tqparent, label->setBuddy( mStatusCombo ); - KToolBarButton * btn = new KToolBarButton( "mail_tqfind", 0, tqparent, + KToolBarButton * btn = new KToolBarButton( "mail_find", 0, tqparent, 0, i18n( "Open Full Search" ) ); connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); @@ -155,10 +155,10 @@ bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQStri // The full email address is not visible, but we still want it to be searchable. // KListViewSearchLine::itemMatches() only searches in visible columns. const HeaderItem *headerItem = static_cast<const HeaderItem*>( item ); - if ( headerItem->from().lower().tqcontains( s.lower() ) ) { + if ( headerItem->from().lower().contains( s.lower() ) ) { return true; } - if ( headerItem->to().lower().tqcontains( s.lower() ) ) { + if ( headerItem->to().lower().contains( s.lower() ) ) { return true; } diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp index 99cc4f5f0..239525d30 100644 --- a/kmail/headerstrategy.cpp +++ b/kmail/headerstrategy.cpp @@ -243,8 +243,8 @@ namespace KMail { } bool HeaderStrategy::showHeader( const TQString & header ) const { - if ( headersToDisplay().tqcontains( header.lower() ) ) return true; - if ( headersToHide().tqcontains( header.lower() ) ) return false; + if ( headersToDisplay().contains( header.lower() ) ) return true; + if ( headersToHide().contains( header.lower() ) ) return false; return defaultPolicy() == Display; } diff --git a/kmail/imapaccountbase.cpp b/kmail/imapaccountbase.cpp index d82ba5cc9..a06163799 100644 --- a/kmail/imapaccountbase.cpp +++ b/kmail/imapaccountbase.cpp @@ -669,7 +669,7 @@ namespace KMail { // split, allow empty parts as we can get empty namespaces TQStringList parts = TQStringList::split( "=", *it, true ); imapNamespace section = imapNamespace( parts[0].toInt() ); - if ( map.tqcontains( section ) ) { + if ( map.contains( section ) ) { nsDelim = map[section]; } else { nsDelim.clear(); @@ -736,12 +736,12 @@ namespace KMail { TQString msg = i18n("KMail has detected a prefix entry in the " "configuration of the account \"%1\" which is obsolete with the " "support of IMAP namespaces.").tqarg( name() ); - if ( list.tqcontains( "" ) ) { + if ( list.contains( "" ) ) { // replace empty entry with the old prefix list.remove( "" ); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { TQString delim = mNamespaceToDelimiter[""]; mNamespaceToDelimiter.remove( "" ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -755,7 +755,7 @@ namespace KMail { list.clear(); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( old ) ) { + if ( mNamespaceToDelimiter.contains( old ) ) { TQString delim = mNamespaceToDelimiter[old]; mNamespaceToDelimiter.remove( old ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -799,7 +799,7 @@ namespace KMail { ns = ns.left( ns.length()-1 ); } // first ignore an empty prefix as it would match always - if ( !ns.isEmpty() && path.tqfind( ns ) != -1 ) { + if ( !ns.isEmpty() && path.find( ns ) != -1 ) { return (*strit); } } @@ -812,7 +812,7 @@ namespace KMail { { //kdDebug(5006) << "delimiterForNamespace " << prefix << endl; // try to match exactly - if ( mNamespaceToDelimiter.tqcontains(prefix) ) { + if ( mNamespaceToDelimiter.contains(prefix) ) { return mNamespaceToDelimiter[prefix]; } @@ -824,13 +824,13 @@ namespace KMail { // make sure we also match this version TQString stripped = it.key().left( it.key().length() - 1 ); if ( !it.key().isEmpty() && - ( prefix.tqcontains( it.key() ) || prefix.tqcontains( stripped ) ) ) { + ( prefix.contains( it.key() ) || prefix.contains( stripped ) ) ) { return it.data(); } } // see if we have an empty namespace // this should always be the case - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { return mNamespaceToDelimiter[""]; } // well, we tried @@ -894,7 +894,7 @@ namespace KMail { TQString ImapAccountBase::prettifyQuotaError( const TQString& _error, KIO::Job * job ) { TQString error = _error; - if ( error.tqfind( "quota", 0, false ) == -1 ) return error; + if ( error.find( "quota", 0, false ) == -1 ) return error; // this is a quota error, prettify it a bit JobIterator it = findJob( job ); TQString quotaAsString( i18n("No detailed quota information available.") ); @@ -1025,7 +1025,7 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::processNewMailInFolder( KMFolder* folder, FolderListType type /*= Single*/ ) { - if ( mFoldersQueuedForChecking.tqcontains( folder ) ) + if ( mFoldersQueuedForChecking.contains( folder ) ) return; mFoldersQueuedForChecking.append( folder ); mCheckingSingleFolder = ( type == Single ); @@ -1057,7 +1057,7 @@ namespace KMail { //----------------------------------------------------------------------------- bool ImapAccountBase::checkingMail( KMFolder *folder ) { - if (checkingMail() && mFoldersQueuedForChecking.tqcontains(folder)) + if (checkingMail() && mFoldersQueuedForChecking.contains(folder)) return true; return false; } diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h index 4b5cda92c..c533171df 100644 --- a/kmail/imapaccountbase.h +++ b/kmail/imapaccountbase.h @@ -174,7 +174,7 @@ namespace KMail { /** * Look for the jobData related to a given job. Compare with end() */ - JobIterator findJob( KIO::Job* job ) { return mapJobData.tqfind( job ); } + JobIterator findJob( KIO::Job* job ) { return mapJobData.find( job ); } JobIterator jobsEnd() { return mapJobData.end(); } /** * Call this when a job is finished. @@ -398,7 +398,7 @@ namespace KMail { * Returns true if the account has the given capability */ bool hasCapability( const TQString& capa ) { - return mCapabilities.tqcontains( capa ); } + return mCapabilities.contains( capa ); } /** * Create an IMAP path for a tqparent folder and a foldername diff --git a/kmail/imapjob.cpp b/kmail/imapjob.cpp index be94557de..c25b29097 100644 --- a/kmail/imapjob.cpp +++ b/kmail/imapjob.cpp @@ -118,7 +118,7 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, ++it; if ( mSrcFolder && !curMsg->isMessage() ) { - int idx = mSrcFolder->tqfind( curMsg ); + int idx = mSrcFolder->find( curMsg ); curMsg = mSrcFolder->getMsg( idx ); } KURL url = account->getUrl(); @@ -130,10 +130,10 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, curMsg->msgSizeServer() : curMsg->msgSize(); jd.msgList.append( curMsg ); TQCString cstr( curMsg->asString() ); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - jd.data.resize( cstr.length() + cstr.tqcontains( "\n" ) - cstr.tqcontains( "\r\n" ) ); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + jd.data.resize( cstr.length() + cstr.contains( "\n" ) - cstr.contains( "\r\n" ) ); unsigned int i = 0; char prevChar = '\0'; // according to RFC 2060 we need CRLF @@ -290,7 +290,7 @@ void ImapJob::slotGetNextMessage() jd.msgList.append( msg ); if ( !mPartSpecifier.isEmpty() ) { - if ( mPartSpecifier.tqfind ("STRUCTURE", 0, false) != -1 ) { + if ( mPartSpecifier.find ("STRUCTURE", 0, false) != -1 ) { path += ";SECTION=STRUCTURE"; } else if ( mPartSpecifier == "HEADER" ) { path += ";SECTION=HEADER"; @@ -325,7 +325,7 @@ void ImapJob::slotGetNextMessage() KIO::Scheduler::assignJobToSlave( account->slave(), simpleJob ); mJob = simpleJob; account->insertJob( mJob, jd ); - if ( mPartSpecifier.tqfind( "STRUCTURE", 0, false ) != -1 ) + if ( mPartSpecifier.find( "STRUCTURE", 0, false ) != -1 ) { connect( mJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotGetBodyStructureResult(KIO::Job *)) ); @@ -448,7 +448,7 @@ void ImapJob::slotGetMessageResult( KIO::Job * job ) * this means that the msg is not on the server anymore so delete it */ emit messageRetrieved( 0 ); tqparent->ignoreJobsForMessage( msg ); - int idx = tqparent->tqfind( msg ); + int idx = tqparent->find( msg ); if (idx != -1) tqparent->removeMsg( idx, true ); // the removeMsg will unGet the message, which will delete all // jobs, including this one @@ -583,7 +583,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if (data.tqfind("UID") != -1) + if (data.find("UID") != -1) { // split TQString oldUid = data.section(' ', 1, 1); @@ -598,7 +598,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) for ( msg = (*it).msgList.first(); msg; msg = (*it).msgList.next() ) { ulong uid = msg->UID(); - index = olduids.tqfindIndex(uid); + index = olduids.findIndex(uid); if (index > -1) { // found, get the new uid @@ -622,7 +622,7 @@ void ImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if ( data.tqfind("UID") != -1 ) + if ( data.find("UID") != -1 ) { ulong uid = ( data.right(data.length()-4) ).toInt(); if ( !(*it).msgList.isEmpty() ) diff --git a/kmail/importjob.cpp b/kmail/importjob.cpp index a84ecf519..fc41a46ba 100644 --- a/kmail/importjob.cpp +++ b/kmail/importjob.cpp @@ -273,7 +273,7 @@ static TQString folderNameForDirectoryName( const TQString &dirName ) Q_ASSERT( dirName.startsWith( "." ) ); const TQString end = ".directory"; const int expectedIndex = dirName.length() - end.length(); - if ( dirName.lower().tqfind( end ) != expectedIndex ) + if ( dirName.lower().find( end ) != expectedIndex ) return TQString(); TQString returnName = dirName.left( dirName.length() - end.length() ); returnName = returnName.right( returnName.length() - 1 ); diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp index 2135a9e79..5d156f8ec 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -555,7 +555,7 @@ namespace { static TQString canonicalAddress( const TQString & _address ) { const TQString address = KPIM::getEmailAddress( _address ); - if ( address.tqfind('@') == -1 ) { + if ( address.find('@') == -1 ) { // local address //char hostname[1024]; //gethostname(hostname,1024); diff --git a/kmail/khtmlparthtmlwriter.cpp b/kmail/khtmlparthtmlwriter.cpp index 64f085f92..174c2c3a2 100644 --- a/kmail/khtmlparthtmlwriter.cpp +++ b/kmail/khtmlparthtmlwriter.cpp @@ -140,7 +140,7 @@ namespace KMail { DOM::HTMLImageElement image( node ); KURL url( image.src().string() ); if ( url.protocol() == "cid" ) { - EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.tqfind( url.path() ); + EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.find( url.path() ); if ( it != mEmbeddedPartMap.end() ) { kdDebug(5006) << "Replacing " << url.prettyURL() << " by " << it.data() << endl; image.setSrc( it.data() ); diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp index 796ac382f..20105acd8 100644 --- a/kmail/kmaccount.cpp +++ b/kmail/kmaccount.cpp @@ -493,7 +493,7 @@ void KMAccount::checkDone( bool newmail, ChecktqStatus status ) //----------------------------------------------------------------------------- void KMAccount::addToNewInFolder( TQString folderId, int num ) { - if ( mNewInFolder.tqfind( folderId ) == mNewInFolder.end() ) + if ( mNewInFolder.find( folderId ) == mNewInFolder.end() ) mNewInFolder[folderId] = num; else mNewInFolder[folderId] += num; diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp index 0c89e6b13..76339dd65 100644 --- a/kmail/kmacctcachedimap.cpp +++ b/kmail/kmacctcachedimap.cpp @@ -287,7 +287,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder, // therefore doesn't need to be counted here const TQString folderId = folder->folder()->idString(); int newInFolder = countUnread; - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) addToNewInFolder( folderId, newInFolder ); @@ -417,12 +417,12 @@ TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const { - return mDeletedFolders.tqfind( subFolderPath ) != mDeletedFolders.end(); + return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end(); } bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const { - return mPreviouslyDeletedFolders.tqfind( subFolderPath ) != mPreviouslyDeletedFolders.end(); + return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end(); } void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath ) @@ -459,7 +459,7 @@ FolderStorage* KMAcctCachedImap::rootFolder() const TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const { - TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.tqfind( imapPath ); + TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath ); if ( renit != mRenamedFolders.end() ) return (*renit).mNewName; return TQString(); diff --git a/kmail/kmacctimap.cpp b/kmail/kmacctimap.cpp index bb09d692d..d889b65b2 100644 --- a/kmail/kmacctimap.cpp +++ b/kmail/kmacctimap.cpp @@ -402,7 +402,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) // count the unread messages const TQString folderId = folder->idString(); int newInFolder = folder->countUnread(); - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) { addToNewInFolder( folderId, newInFolder ); @@ -580,7 +580,7 @@ void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool ) void KMAcctImap::execFilters(TQ_UINT32 serNum) { if ( !kmkernel->filterMgr()->atLeastOneFilterAppliesTo( id() ) ) return; - TQValueListIterator<TQ_UINT32> findIt = mFilterSerNums.tqfind( serNum ); + TQValueListIterator<TQ_UINT32> findIt = mFilterSerNums.find( serNum ); if ( findIt != mFilterSerNums.end() ) return; mFilterSerNums.append( serNum ); diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp index 8fdc5554c..adc888a42 100644 --- a/kmail/kmaddrbook.cpp +++ b/kmail/kmaddrbook.cpp @@ -56,18 +56,18 @@ void KabcBridge::addresses(TQStringList& result) // includes lists for ( mit = emails.begin(); mit != emails.end(); ++mit ) { email = *mit; if (!email.isEmpty()) { - if (n.isEmpty() || (email.tqfind( '<' ) != -1)) + if (n.isEmpty() || (email.find( '<' ) != -1)) addr = TQString(); else { // do we really need quotes around this name ? - if (n.tqfind(needQuotes) != -1) + if (n.find(needQuotes) != -1) addr = '"' + n + endQuote; else addr = n + ' '; } - if (!addr.isEmpty() && (email.tqfind( '<' ) == -1) - && (email.tqfind( '>' ) == -1) - && (email.tqfind( ',' ) == -1)) + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) addr += '<' + email + '>'; else addr += email; @@ -126,7 +126,7 @@ TQStringList KabcBridge::categories() for ( TQStringList::ConstIterator itAux = aux.begin(); itAux != aux.end(); ++itAux ) { // don't have duplicates in allcategories - if ( allcategories.tqfind( *itAux ) == allcategories.end() ) + if ( allcategories.find( *itAux ) == allcategories.end() ) allcategories += *itAux; } } diff --git a/kmail/kmail.kcfg b/kmail/kmail.kcfg index 52a30a4d8..8054b9d82 100644 --- a/kmail/kmail.kcfg +++ b/kmail/kmail.kcfg @@ -451,14 +451,14 @@ <entry name="ReplyPrefixes" type="StringList" key="reply-prefixes"> <default>Re\\s*:,Re\\[\\d+\\]:,Re\\d+:</default> </entry> - <entry name="ReplaceReplyPrefix" type="Bool" key="tqreplace-reply-prefix"> + <entry name="ReplaceReplyPrefix" type="Bool" key="replace-reply-prefix"> <label>Replace recognized prefi&x with "Re:"</label> <default>true</default> </entry> <entry name="ForwardPrefixes" type="StringList" key="forward-prefixes"> <default>Fwd:,FW:</default> </entry> - <entry name="ReplaceForwardPrefix" type="Bool" key="tqreplace-forward-prefix"> + <entry name="ReplaceForwardPrefix" type="Bool" key="replace-forward-prefix"> <label>Replace recognized prefix with "&Fwd:"</label> <default>true</default> </entry> diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp index bf0e5b8c3..82084b134 100644 --- a/kmail/kmailicalifaceimpl.cpp +++ b/kmail/kmailicalifaceimpl.cpp @@ -260,7 +260,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, KMMessagePart msgPart; msgPart.setName( attachmentName ); - const int iSlash = attachmentMimetype.tqfind('/'); + const int iSlash = attachmentMimetype.find('/'); const TQCString sType = attachmentMimetype.left( iSlash ).latin1(); const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1(); msgPart.setTypeStr( sType ); @@ -309,7 +309,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, // Look for the attachment with the right mimetype bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ ); @@ -325,7 +325,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQ // Delete an attachment in an existing mail. // return value: wrong if attachment could not be deleted // -// This code could be optimized: for now we just tqreplace +// This code could be optimized: for now we just replace // the attachment by an empty dummy attachment since Mimelib // does not provide an option for deleting attachments yet. bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg, @@ -566,7 +566,7 @@ TQMap<TQ_UINT32, TQString> KMailICalIfaceImpl::incidencesKolab( const TQString& KMMessage* msg = f->storage()->readTemporaryMsg(i); #endif if ( msg ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); if ( sType.isEmpty() || sSubtype.isEmpty() ) { @@ -616,7 +616,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) TQ_UINT32 sernum = msg->getMsgSerNum(); // do we have an accumulator for this folder? - Accumulator *ac = mAccumulators.tqfind( tqparent->location() ); + Accumulator *ac = mAccumulators.find( tqparent->location() ); if( ac ) { TQString s; if ( !vPartFoundAndDecoded( msg, s ) ) return; @@ -637,7 +637,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) slotIncidenceAdded( msg->tqparent(), msg->getMsgSerNum() ); } - if ( mTheUnGetMes.tqcontains( sernum ) ) { + if ( mTheUnGetMes.contains( sernum ) ) { mTheUnGetMes.remove( sernum ); int i = 0; KMFolder* folder = 0; @@ -666,7 +666,7 @@ int KMailICalIfaceImpl::dimapAccounts() static TQString subresourceLabelForPresentation( const KMFolder * folder ) { - if( KMailICalIfaceImpl::getResourceMap()->tqcontains( folder->location() ) ) { + if( KMailICalIfaceImpl::getResourceMap()->contains( folder->location() ) ) { return folder->label(); } @@ -1044,7 +1044,7 @@ TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, TQ_U TQString name; DwMediaType& contentType = part->Headers().ContentType(); if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." ) - || TQString( contentType.SubtypeStr().c_str() ).tqcontains( "tnef" ) ) + || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) ) continue; if ( !part->Headers().ContentDisposition().Filename().empty() ) name = part->Headers().ContentDisposition().Filename().c_str(); @@ -1131,7 +1131,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, mUIDToSerNum.insert( uid, sernum ); // tell the resource if we didn't trigger this ourselves - if ( mInTransit.tqcontains( uid ) ) { + if ( mInTransit.contains( uid ) ) { mInTransit.remove( uid ); } incidenceAdded( type, folder->location(), sernum, format, s ); @@ -1213,7 +1213,7 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder) if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { // Refresh the folder of this type KMail::FolderContentsType ct = folder->storage()->contentsType(); slotRefresh( s_folderContentsType[ct].contentsTypeStr ); @@ -1257,7 +1257,7 @@ KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type, bool KMailICalIfaceImpl::isResourceFolder( KMFolder* folder ) const { return mUseResourceIMAP && folder && - ( isStandardResourceFolder( folder ) || mExtraFolders.tqfind( folder->location() )!=0 ); + ( isStandardResourceFolder( folder ) || mExtraFolders.find( folder->location() )!=0 ); } bool KMailICalIfaceImpl::isStandardResourceFolder( KMFolder* folder ) const @@ -1286,7 +1286,7 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { KMail::FolderContentsType ct = folder->storage()->contentsType(); return s_folderContentsType[ct].treeItemType; } @@ -1352,7 +1352,7 @@ TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int languag // Find message matching a given UID KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder ) { - if( !folder || !mUIDToSerNum.tqcontains( uid ) ) return 0; + if( !folder || !mUIDToSerNum.contains( uid ) ) return 0; int i; KMFolder *aFolder; KMMsgDict::instance()->getLocation( mUIDToSerNum[uid], &aFolder, &i ); @@ -1387,7 +1387,7 @@ void KMailICalIfaceImpl::deleteMsg( KMMessage *msg ) // Commands are now delayed; can't use that anymore, we need immediate deletion //( new KMDeleteMsgCommand( msg->tqparent(), msg ) )->start(); KMFolder *srcFolder = msg->tqparent(); - int idx = srcFolder->tqfind(msg); + int idx = srcFolder->find(msg); assert(idx != -1); // kill existing jobs since we are about to delete the message srcFolder->ignoreJobsForMessage( msg ); @@ -1415,7 +1415,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, // Check if already know that 'extra folder' const TQString location = folder->location(); - ExtraFolder* ef = mExtraFolders.tqfind( location ); + ExtraFolder* ef = mExtraFolders.find( location ); if ( ef && ef->folder ) { // Notify that the old folder resource is no longer available subresourceDeleted(folderContentsType( folder->storage()->contentsType() ), location ); @@ -1469,7 +1469,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, if ( t < 1 || t > 5 ) return 0; - ExtraFolder* ef = mExtraFolders.tqfind( folder ); + ExtraFolder* ef = mExtraFolders.find( folder ); if ( ef && ef->folder && ef->folder->storage()->contentsType() == t ) return ef->folder; @@ -1478,7 +1478,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* folder ) const { - FolderInfoMap::ConstIterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::ConstIterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) return (*it).mStorageFormat; return globalStorageFormat(); @@ -1486,7 +1486,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* f void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat format ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mStorageFormat = format; } else { @@ -1500,7 +1500,7 @@ void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat forma void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges changes ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mChanges = static_cast<FolderChanges>( (*it).mChanges | changes ); } else { // Otherwise, well, it's a folder we don't care about. @@ -1529,7 +1529,7 @@ KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolde void KMailICalIfaceImpl::folderSynced( KMFolder* folder, const KURL& folderURL ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() && (*it).mChanges ) { handleFolderSynced( folder, folderURL, (*it).mChanges ); (*it).mChanges = NoChange; @@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) { /* Steffen said: you must issue an authenticated HTTP GET request to https://kolabserver/freebusy/trigger/user@domain/Folder/NestedFolder.pfb - (tqreplace .pfb with .xpfb for extended fb lists). */ + (replace .pfb with .xpfb for extended fb lists). */ KURL httpURL( folderURL ); // Keep username ("user@domain"), pass, and host from the imap url httpURL.setProtocol( "https" ); @@ -1569,7 +1569,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) // IMAP path is either /INBOX/<path> or /user/someone/<path> TQString path = folderURL.path( -1 ); Q_ASSERT( path.startsWith( "/" ) ); - int secondSlash = path.tqfind( '/', 1 ); + int secondSlash = path.find( '/', 1 ); if ( secondSlash == -1 ) { kdWarning() << "KCal::ResourceKolab::fromKMailFolderSynced path is too short: " << path << endl; return; @@ -1617,7 +1617,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation, const TQString &newLocation ) { KMFolder *folder = findResourceFolder( oldLocation ); - ExtraFolder* ef = mExtraFolders.tqfind( oldLocation ); + ExtraFolder* ef = mExtraFolders.find( oldLocation ); if ( ef ) { // reuse the ExtraFolder entry, but adjust the key mExtraFolders.setAutoDelete( false ); @@ -1645,7 +1645,7 @@ KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource ) return mJournals; // No luck. Try the extrafolders - ExtraFolder* ef = mExtraFolders.tqfind( resource ); + ExtraFolder* ef = mExtraFolders.find( resource ); if ( ef ) return ef->folder; @@ -1713,7 +1713,7 @@ void KMailICalIfaceImpl::readConfig() // configure things again. kdDebug(5006) << "Groupware folder " << parentName << " not found. Groupware functionality disabled" << endl; // Or maybe the inbox simply wasn't created on the first startup - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); Q_ASSERT( account ); if ( account ) { // just in case we were connected already @@ -1922,8 +1922,8 @@ void KMailICalIfaceImpl::readConfig() KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-FolderClass" ) ) { - if ( !attributes.tqcontains( "X-SpecialFolder" ) || (*it)->location().tqcontains( "@" ) ) { + if ( attributes.contains( "X-FolderClass" ) ) { + if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( !parser.folderClass().isEmpty() ) { FolderContentsType type = Scalix::Utils::scalixIdToContentsType( parser.folderClass() ); @@ -1964,7 +1964,7 @@ void KMailICalIfaceImpl::slotCheckDone() //kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl; if ( folderParent ) // cool it exists now { - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); if ( account ) disconnect( account, TQT_SIGNAL( finishedCheck( bool, ChecktqStatus ) ), this, TQT_SLOT( slotCheckDone() ) ); @@ -1993,7 +1993,7 @@ KMFolder* KMailICalIfaceImpl::initFolder( KMail::FolderContentsType contentsType i18n("There are multiple %1 default folders, please choose one:") .tqarg( localizedDefaultFolderName( contentsType ) ), labels ); if ( !selected.isEmpty() ) - result.folder = result.folders[ labels.tqfindIndex( selected ) ]; + result.folder = result.folders[ labels.findIndex( selected ) ]; } KMFolder* folder = result.folder; @@ -2051,7 +2051,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-SpecialFolder" ) ) { + if ( attributes.contains( "X-SpecialFolder" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) { folder = *it; diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 3f83fad61..bdd700bf8 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -229,7 +229,7 @@ void KMCommand::slotStart() this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); kmkernel->filterMgr()->ref(); - if (mMsgList.tqfind(0) != -1) { + if (mMsgList.find(0) != -1) { emit messagesTransfered( Failed ); return; } @@ -316,7 +316,7 @@ void KMCommand::transferSelectedMsgs() else { KMFolder *folder = mb->tqparent(); - int idx = folder->tqfind(mb); + int idx = folder->find(mb); if (idx < 0) continue; thisMsg = folder->getMsg(idx); } @@ -441,7 +441,7 @@ void KMCommand::slotTransferCancelled() if (!folder) continue; msg->setTransferInProgress(false); - int idx = folder->tqfind(msg); + int idx = folder->find(msg); if (idx > 0) folder->unGetMsg(idx); } mRetrievedMsgs.clear(); @@ -682,7 +682,7 @@ KMCommand::Result KMEditMsgCommand::execute() // edit is discarded, for n > 1. KMFolder *tqparent = msg->tqparent(); if ( tqparent ) - tqparent->take( tqparent->tqfind( msg ) ); + tqparent->take( tqparent->find( msg ) ); KMail::Composer * win = KMail::makeComposer(); msg->setTransferInProgress(false); // From here on on, the composer owns the message. @@ -774,11 +774,11 @@ static KURL subjectToUrl( const TQString & subject ) // https://issues.kolab.org/issue3805 const TQString filter = i18n( "*.mbox|email messages (*.mbox)\n*|all files (*)" ); TQString cleanSubject = subject.stripWhiteSpace() - .tqreplace( TQDir::separator(), '_' ) - .tqreplace( ": ", "_" ) - .tqreplace( ':', '_' ) - .tqreplace( '.', '_' ) - .tqreplace( '~', '_' ); + .replace( TQDir::separator(), '_' ) + .replace( ": ", "_" ) + .replace( ':', '_' ) + .replace( '.', '_' ) + .replace( '~', '_' ); return KFileDialog::getSaveURL( cleanSubject, filter ); } @@ -945,7 +945,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg) ++mMsgListIndex; // Get rid of the message. if ( msg && msg->tqparent() && msg->getMsgSerNum() && - mUngetMsgs.tqcontains( msg ) ) { + mUngetMsgs.contains( msg ) ) { int idx = -1; KMFolder * p = 0; KMMsgDict::instance()->getLocation( msg, &p, &idx ); @@ -1041,7 +1041,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) else { int startOfMessage = 0; if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) { - startOfMessage = mMsgString.tqfind( '\n' ); + startOfMessage = mMsgString.find( '\n' ); if ( startOfMessage == -1 ) { KMessageBox::sorry( parentWidget(), i18n( "The file does not contain a message." ) ); @@ -1060,7 +1060,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) } // check for multiple messages in the file bool multipleMessages = true; - int endOfMessage = mMsgString.tqfind( "\nFrom " ); + int endOfMessage = mMsgString.find( "\nFrom " ); if ( endOfMessage == -1 ) { endOfMessage = mMsgString.length(); multipleMessages = false; @@ -1403,7 +1403,7 @@ KMCommand::Result KMForwardDigestCommand::execute() dwh.MessageId().CreateDefault(); msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() ); msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() ); - if ( !msg->subject().tqcontains( "(fwd)" ) ) + if ( !msg->subject().contains( "(fwd)" ) ) msgPartText += " (fwd)"; msgPartText += "\n\n"; // remove headers that shouldn't be forwarded @@ -1849,7 +1849,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if (popup) delete popup; else @@ -1932,7 +1932,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, continue; KMFolder *child = static_cast<KMFolder*>(it); TQString label = child->label(); - label.tqreplace("&","&&"); + label.replace("&","&&"); if (child->child() && child->child()->first()) { // descend TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu"); @@ -1989,7 +1989,7 @@ KMCommand::Result KMCopyCommand::execute() { msg = static_cast<KMMessage*>(msgBase); } else { - idx = srcFolder->tqfind(msgBase); + idx = srcFolder->find(msgBase); assert(idx != -1); msg = srcFolder->getMsg(idx); // corrupt IMAP cache, see FolderStorage::getMsg() @@ -2307,7 +2307,7 @@ void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool succe void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum) { - if ( folder != mDestFolder || mLostBoys.tqfind( serNum ) == mLostBoys.end() ) { + if ( folder != mDestFolder || mLostBoys.find( serNum ) == mLostBoys.end() ) { //kdDebug(5006) << "KMMoveCommand::msgAddedToDestFolder different " // "folder or invalid serial number." << endl; return; @@ -2421,7 +2421,7 @@ KMCommand::Result KMUrlClickedCommand::execute() TQString query=mUrl.query(); while (!query.isEmpty()) { TQString queryPart; - int secondQuery = query.tqfind('?',1); + int secondQuery = query.find('?',1); if (secondQuery != -1) queryPart = query.left(secondQuery); else @@ -2572,9 +2572,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() partNode *node = mAttachmentMap.begin().key(); // replace all ':' with '_' because ':' isn't allowed on FAT volumes TQString s = - node->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = i18n("filename for an unnamed attachment", "attachment.1"); url = KFileDialog::getSaveURL( s, TQString(), parentWidget(), @@ -2598,9 +2598,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() if ( !dirUrl.isEmpty() ) { curUrl = dirUrl; TQString s = - it.key()->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = it.key()->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) { ++unnamedAtmCount; s = i18n("filename for the %1-th unnamed attachment", @@ -2619,22 +2619,22 @@ void KMSaveAttachmentsCommand::slotSaveAll() TQString origFile = curUrl.fileName(); TQString file = origFile; - while ( renameNumbering.tqcontains(file) ) { + while ( renameNumbering.contains(file) ) { file = origFile; int num = renameNumbering[file] + 1; - int dotIdx = file.tqfindRev('.'); + int dotIdx = file.findRev('.'); file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) ); } curUrl.setFileName(file); // Increment the counter for both the old and the new filename - if ( !renameNumbering.tqcontains(origFile)) + if ( !renameNumbering.contains(origFile)) renameNumbering[origFile] = 1; else renameNumbering[origFile]++; if ( file != origFile ) { - if ( !renameNumbering.tqcontains(file)) + if ( !renameNumbering.contains(file)) renameNumbering[file] = 1; else renameNumbering[file]++; diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp index 328bbe021..45daa0c36 100644 --- a/kmail/kmcomposewin.cpp +++ b/kmail/kmcomposewin.cpp @@ -557,7 +557,7 @@ void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const TQString connect(this, TQT_SIGNAL(attachmentAdded(const KURL&, bool)), TQT_SLOT(slotAttachedFile(const KURL&))); for( KURL::List::ConstIterator itr = urls.begin(); itr != urls.end(); ++itr ) { if (!addAttach( *itr )) - mAttachFilesPending.remove(mAttachFilesPending.tqfind(*itr)); // only remove one copy of the url + mAttachFilesPending.remove(mAttachFilesPending.find(*itr)); // only remove one copy of the url } if (mAttachFilesPending.isEmpty() && mAttachFilesSend == how) @@ -571,7 +571,7 @@ void KMComposeWin::slotAttachedFile(const KURL &url) { if (mAttachFilesPending.isEmpty()) return; - mAttachFilesPending.remove(mAttachFilesPending.tqfind(url)); // only remove one copy of url + mAttachFilesPending.remove(mAttachFilesPending.find(url)); // only remove one copy of url if (mAttachFilesPending.isEmpty()) { send(mAttachFilesSend); @@ -787,7 +787,7 @@ void KMComposeWin::writeConfig(void) mAutoSpellCheckingAction->isChecked() ); TQStringList transportHistory = GlobalSettings::self()->transportHistory(); transportHistory.remove(mTransport->currentText()); - if (KMTransportInfo::availableTransports().tqfindIndex(mTransport + if (KMTransportInfo::availableTransports().findIndex(mTransport ->currentText()) == -1) { transportHistory.prepend(mTransport->currentText()); } @@ -1219,8 +1219,8 @@ void KMComposeWin::getTransportMenu() int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) { - mActNowMenu->insertItem((*it).tqreplace("&", "&&"), id); - mActLaterMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActNowMenu->insertItem((*it).replace("&", "&&"), id); + mActLaterMenu->insertItem((*it).replace("&", "&&"), id); } } @@ -1695,8 +1695,8 @@ static TQString cleanedUpHeaderString( const TQString & s ) { // remove invalid characters from the header strings TQString res( s ); - res.tqreplace( '\r', "" ); - res.tqreplace( '\n', " " ); + res.replace( '\r', "" ); + res.replace( '\n', " " ); return res.stripWhiteSpace(); } @@ -2773,7 +2773,7 @@ void KMComposeWin::slotAttachFile() //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) { - TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); @@ -2785,10 +2785,10 @@ void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileResult(KIO::Job *job) { - TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); KURL attachURL; - TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.tqfind(job); + TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job); bool attachURLfound = (jit != mAttachJobs.end()); if (attachURLfound) { @@ -2847,7 +2847,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) TQString ext; if( !patterns.isEmpty() ) { ext = patterns[0]; - int i = ext.tqfindRev( '.' ); + int i = ext.findRev( '.' ); if( i == -1 ) ext.prepend( '.' ); else if( i > 0 ) @@ -2886,7 +2886,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) !kmkernel->msgSender()->sendQuotedPrintable()); kdDebug(5006) << "autodetected cte: " << msgPart->cteStr() << endl; } - int slash = mimeType.tqfind( '/' ); + int slash = mimeType.find( '/' ); if( slash == -1 ) slash = mimeType.length(); msgPart->setTypeStr( mimeType.left( slash ).latin1() ); @@ -2998,7 +2998,7 @@ void KMComposeWin::slotInsertRecentFile(const KURL& u) KConfigGroupSaver saver( config, "Composer" ); TQStringList urls = config->readListEntry( "recent-urls" ); TQStringList encodings = config->readListEntry( "recent-encodings" ); - int index = urls.tqfindIndex( u.prettyURL() ); + int index = urls.findIndex( u.prettyURL() ); if (index != -1) { TQString encoding = encodings[ index ]; ld.encoding = encoding.latin1(); @@ -3725,7 +3725,7 @@ TQString KMComposeWin::addQuotesToText(const TQString &inputText) { TQString answer = TQString( inputText ); TQString indentStr = quotePrefixName(); - answer.tqreplace( '\n', '\n' + indentStr); + answer.replace( '\n', '\n' + indentStr); answer.prepend( indentStr ); answer += '\n'; return KMMessage::smartQuote( answer, GlobalSettings::self()->lineWrapWidth() ); @@ -3743,7 +3743,7 @@ TQString KMComposeWin::removeQuotesFromText(const TQString &inputText) // now remove all remaining leading quotes quotePrefix = '\n' + quotePrefixName(); rx = quotePrefix; - s.tqreplace(rx, "\n"); + s.replace(rx, "\n"); return s; } @@ -3918,7 +3918,7 @@ void KMComposeWin::slotUpdWinTitle(const TQString& text) // newlines tend to become boxes. if (text.isEmpty()) setCaption("("+i18n("unnamed")+")"); - else setCaption( s.tqreplace( TQChar('\n'), ' ' ) ); + else setCaption( s.replace( TQChar('\n'), ' ' ) ); } @@ -4605,15 +4605,15 @@ void KMComposeWin::slotCleanSpace() // Squeeze tabs and spaces TQRegExp squeeze( "[\t ]+" ); - s.tqreplace( squeeze, TQChar( ' ' ) ); + s.replace( squeeze, TQChar( ' ' ) ); // Remove trailing whitespace TQRegExp trailing( "\\s+$" ); - s.tqreplace( trailing, TQChar( '\n' ) ); + s.replace( trailing, TQChar( '\n' ) ); // Single space lines TQRegExp singleSpace( "[\n]{2,}" ); - s.tqreplace( singleSpace, TQChar( '\n' ) ); + s.replace( singleSpace, TQChar( '\n' ) ); // Restore the signature if ( restore ) @@ -4931,11 +4931,11 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) } mEditor->setText( edtText ); } else { - const int pos = edtText.tqfind( mOldSigText ); + const int pos = edtText.find( mOldSigText ); if ( pos >= 0 && !mOldSigText.isEmpty() ) { const int oldLength = mOldSigText.length(); mOldSigText = "\n\n"+ ident.signature().rawText() + "\n"; // see insertSignature() - edtText = edtText.tqreplace( pos, oldLength, mOldSigText ); + edtText = edtText.replace( pos, oldLength, mOldSigText ); mEditor->setText( edtText ); } else { insertSignature( Append ); diff --git a/kmail/kmdict.cpp b/kmail/kmdict.cpp index 0ba60ed55..0ad9367be 100644 --- a/kmail/kmdict.cpp +++ b/kmail/kmdict.cpp @@ -54,7 +54,7 @@ void KMDict::clear() //----------------------------------------------------------------------------- -void KMDict::tqreplace( long key, KMDictItem *item ) +void KMDict::replace( long key, KMDictItem *item ) { insert( key, item ); removeFollowing( item, key ); // remove other items with same key @@ -104,7 +104,7 @@ void KMDict::removeFollowing(KMDictItem *item, long key) //----------------------------------------------------------------------------- -KMDictItem *KMDict::tqfind(long key) +KMDictItem *KMDict::find(long key) { int idx = (unsigned long)key % mSize; KMDictItem *item = mVecs[idx]; diff --git a/kmail/kmdict.h b/kmail/kmdict.h index 0b365acb6..6cbbefd5a 100644 --- a/kmail/kmdict.h +++ b/kmail/kmdict.h @@ -40,7 +40,7 @@ public: int size() { return mSize; } /** Inserts an item, replacing old ones with the same key. */ - void tqreplace(long key, KMDictItem *item); + void replace(long key, KMDictItem *item); /** Inserts an item without replacing ones with the same key. */ void insert(long key, KMDictItem *item); @@ -49,7 +49,7 @@ public: void remove(long key); /** Find an item by key. Returns pointer to it, or 0 if not found. */ - KMDictItem *tqfind(long key); + KMDictItem *find(long key); private: /** Removes all items _following_ @p item with key @p key. */ diff --git a/kmail/kmedit.cpp b/kmail/kmedit.cpp index dbbb53808..336901b37 100644 --- a/kmail/kmedit.cpp +++ b/kmail/kmedit.cpp @@ -122,7 +122,7 @@ void KMEdit::keyPressEvent( TQKeyEvent* e ) && newLine[leadingWhiteSpaceCount].isSpace() ) { ++leadingWhiteSpaceCount; } - newLine = newLine.tqreplace( 0, leadingWhiteSpaceCount, + newLine = newLine.replace( 0, leadingWhiteSpaceCount, lineText.left( bot ) ); removeParagraph( line ); insertParagraph( newLine, line ); @@ -383,7 +383,7 @@ KMSyntaxHighter::KMSyntaxHighter( TQTextEdit *textEdit, bool KMSyntaxHighter::isMisspelled( const TQString &word ) { - if ( mIgnoredWords.tqcontains( word ) ) { + if ( mIgnoredWords.contains( word ) ) { return false; } else { @@ -440,15 +440,15 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) (*mExtEditorTempFile->textStream()) << text(); mExtEditorTempFile->close(); - // tqreplace %f in the system line - sysLine.tqreplace( "%f", mExtEditorTempFile->name() ); + // replace %f in the system line + sysLine.replace( "%f", mExtEditorTempFile->name() ); mExtEditorProcess = new KProcess(); mExtEditorProcess->setUseShell( true ); sysLine += " "; while (!sysLine.isEmpty()) { - *mExtEditorProcess << sysLine.left(sysLine.tqfind(" ")).local8Bit(); - sysLine.remove(0, sysLine.tqfind(" ") + 1); + *mExtEditorProcess << sysLine.left(sysLine.find(" ")).local8Bit(); + sysLine.remove(0, sysLine.find(" ") + 1); } connect(mExtEditorProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExternalEditorDone(KProcess*))); @@ -497,13 +497,13 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) { //Get word right clicked on const TQRegExp wordBoundary( "[\\s\\W]" ); - firstSpace = paraText.tqfindRev( wordBoundary, charPos ) + 1; - lastSpace = paraText.tqfind( wordBoundary, charPos ); + firstSpace = paraText.findRev( wordBoundary, charPos ) + 1; + lastSpace = paraText.find( wordBoundary, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled - if( !word.isEmpty() && mReplacements.tqcontains( word ) ) + if( !word.isEmpty() && mReplacements.contains( word ) ) { KPopupMenu p; diff --git a/kmail/kmfilter.cpp b/kmail/kmfilter.cpp index 2f6bbbd78..4441b8611 100644 --- a/kmail/kmfilter.cpp +++ b/kmail/kmfilter.cpp @@ -186,9 +186,9 @@ bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder ) void KMFilter::setApplyOnAccount( uint id, bool aApply ) { - if (aApply && !mAccounts.tqcontains( id )) { + if (aApply && !mAccounts.contains( id )) { mAccounts.append( id ); - } else if (!aApply && mAccounts.tqcontains( id )) { + } else if (!aApply && mAccounts.contains( id )) { mAccounts.remove( id ); } } @@ -198,12 +198,12 @@ bool KMFilter::applyOnAccount( uint id ) const if ( applicability() == All ) return true; if ( applicability() == ButImap ) { - KMAccount *account = kmkernel->acctMgr()->tqfind( id ); + KMAccount *account = kmkernel->acctMgr()->find( id ); bool result = account && !dynamic_cast<KMAcctImap*>(account); return result; } if ( applicability() == Checked ) - return mAccounts.tqcontains( id ); + return mAccounts.contains( id ); return false; } @@ -236,9 +236,9 @@ void KMFilter::readConfig(KConfig* config) bApplyOnExplicit = true; mApplicability = ButImap; } else { - bApplyOnInbound = bool(sets.tqcontains("check-mail")); - bApplyOnOutbound = bool(sets.tqcontains("send-mail")); - bApplyOnExplicit = bool(sets.tqcontains("manual-filtering")); + bApplyOnInbound = bool(sets.contains("check-mail")); + bApplyOnOutbound = bool(sets.contains("send-mail")); + bApplyOnExplicit = bool(sets.contains("manual-filtering")); mApplicability = (AccountType)config->readNumEntry( "Applicability", ButImap ); } @@ -363,7 +363,7 @@ void KMFilter::purify() // Remove invalid accounts from mAccounts - just to be tidy TQValueListIterator<int> it2 = mAccounts.begin(); while ( it2 != mAccounts.end() ) { - if ( !kmkernel->acctMgr()->tqfind( *it2 ) ) + if ( !kmkernel->acctMgr()->find( *it2 ) ) it2 = mAccounts.remove( it2 ); else ++it2; @@ -418,8 +418,8 @@ const TQString KMFilter::asString() const if ( mAccounts.isEmpty() ) result += " None"; else for ( it2 = mAccounts.begin() ; it2 != mAccounts.end() ; ++it2 ) - if ( kmkernel->acctMgr()->tqfind( *it2 ) ) - result += " " + kmkernel->acctMgr()->tqfind( *it2 )->name(); + if ( kmkernel->acctMgr()->find( *it2 ) ) + result += " " + kmkernel->acctMgr()->find( *it2 )->name(); result += "\n"; } if ( bStopProcessingHere ) diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index ceef636e6..49378e9d5 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -266,7 +266,7 @@ void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 ); } @@ -277,7 +277,7 @@ void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) con void KMFilterActionWithStringList::argsFromString( const TQString argsStr ) { - int idx = mParameterList.tqfindIndex( argsStr ); + int idx = mParameterList.findIndex( argsStr ); if ( idx < 0 ) { mParameterList.append( argsStr ); idx = mParameterList.count() - 1; @@ -486,7 +486,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs // TQString( "%0 and %1 and %1" ).tqarg( 0 ).tqarg( 1 ) // returns "0 and 1 and %1", so we must call .arg as // many times as there are %n's, regardless of their multiplicity. - if ((*it) == -1) result.tqreplace( "%-1", tempFileName ); + if ((*it) == -1) result.replace( "%-1", tempFileName ); else result = result.tqarg( tempFileName ); } @@ -496,7 +496,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs int idx = 0; while ( ( idx = header_rx.search( result, idx ) ) != -1 ) { TQString replacement = KProcess::quote( aMsg->headerField( TQString(header_rx.cap(1)).latin1() ) ); - result.tqreplace( idx, header_rx.matchedLength(), replacement ); + result.replace( idx, header_rx.matchedLength(), replacement ); idx += replacement.length(); } @@ -806,7 +806,7 @@ KMFilterActionSetqStatus::KMFilterActionSetqStatus() KMFilterAction::ReturnCode KMFilterActionSetqStatus::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; KMMsgtqStatus status = stati[idx-1] ; @@ -833,7 +833,7 @@ void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) const TQString KMFilterActionSetqStatus::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); KMMsgtqStatus status = stati[idx-1]; @@ -901,7 +901,7 @@ KMFilterActionFakeDisposition::KMFilterActionFakeDisposition() KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; if ( idx == 1 ) // ignore @@ -929,7 +929,7 @@ void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr ) const TQString KMFilterActionFakeDisposition::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) ); @@ -996,7 +996,7 @@ void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) co TQComboBox * cb = dynamic_cast<TQComboBox*>(paramWidget); Q_ASSERT( cb ); - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); cb->clear(); cb->insertStringList( mParameterList ); if ( idx < 0 ) { @@ -1074,7 +1074,7 @@ TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* tqparent ) const void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); @@ -1139,7 +1139,7 @@ void KMFilterActionAddHeader::argsFromString( const TQString argsStr ) mValue = l[1]; } - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1196,7 +1196,7 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg) KRegExp3 rx = mRegExp; // KRegExp3::replace is not const. - TQString newValue = rx.tqreplace( msg->headerField( mParameter.latin1() ), + TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ), mReplacementString ); msg->setHeaderField( mParameter.latin1(), newValue ); @@ -1224,7 +1224,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); - TQLineEdit *le = new KLineEdit( w, "tqreplace" ); + TQLineEdit *le = new KLineEdit( w, "replace" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); @@ -1233,7 +1233,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); @@ -1250,7 +1250,7 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) c Q_ASSERT( rele ); rele->setText( mRegExp.pattern() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->setText( mReplacementString ); } @@ -1265,7 +1265,7 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget ) Q_ASSERT( rele ); mRegExp.setPattern( rele->text() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); mReplacementString = le->text(); } @@ -1280,7 +1280,7 @@ void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) cons Q_ASSERT( rele ); rele->clear(); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->clear(); } @@ -1312,7 +1312,7 @@ void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr ) mRegExp.setPattern( l[1] ); mReplacementString = l[2]; - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1596,7 +1596,7 @@ static const TQString forwardFilterArgsSeperator = "@$$@"; void KMFilterActionForward::argsFromString( const TQString argsStr ) { - int seperatorPos = argsStr.tqfind( forwardFilterArgsSeperator ); + int seperatorPos = argsStr.find( forwardFilterArgsSeperator ); if ( seperatorPos == - 1 ) { // Old config, assume that the whole string is the addressee @@ -1745,7 +1745,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job mMsg->setHeaderField( "X-KMail-Filtered", origSerNum ); if ( filterFolder && handler ) { bool oldtqStatus = handler->ignoreChanges( true ); - filterFolder->take( filterFolder->tqfind( mMsg ) ); + filterFolder->take( filterFolder->find( mMsg ) ); filterFolder->addMsg( mMsg ); handler->ignoreChanges( oldtqStatus ); } else { diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp index b16769c58..565bbcc0f 100644 --- a/kmail/kmfiltermgr.cpp +++ b/kmail/kmfiltermgr.cpp @@ -128,10 +128,10 @@ void KMFilterMgr::endFiltering(KMMsgBase *msgBase) const KMFolder *tqparent = msgBase->tqparent(); if ( tqparent ) { if ( tqparent == MessageProperty::filterFolder( msgBase ) ) { - tqparent->take( tqparent->tqfind( msgBase ) ); + tqparent->take( tqparent->find( msgBase ) ); } else if ( ! MessageProperty::filterFolder( msgBase ) ) { - int index = tqparent->tqfind( msgBase ); + int index = tqparent->find( msgBase ); KMMessage *msg = tqparent->getMsg( index ); tqparent->take( index ); tqparent->addMsgKeepUID( msg ); diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp index e8fa8a3d5..08fe43e01 100644 --- a/kmail/kmfolder.cpp +++ b/kmail/kmfolder.cpp @@ -432,14 +432,14 @@ int KMFolder::moveMsg(TQPtrList<KMMessage> q, int* index_return ) return mStorage->moveMsg( q, index_return ); } -int KMFolder::tqfind( const KMMsgBase* msg ) const +int KMFolder::find( const KMMsgBase* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } -int KMFolder::tqfind( const KMMessage* msg ) const +int KMFolder::find( const KMMessage* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } int KMFolder::count( bool cache ) const @@ -717,8 +717,8 @@ TQString KMFolder::idString() const TQString escapedName = name(); /* Escape [ and ] as they are disallowed for kconfig sections and that is what the idString is primarily used for. */ - escapedName.tqreplace( "[", "%(" ); - escapedName.tqreplace( "]", "%)" ); + escapedName.replace( "[", "%(" ); + escapedName.replace( "]", "%)" ); return relativePath + escapedName; } @@ -901,7 +901,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) KMFolderType fldType = folderType(); // names of local folders must not contain a '/' - if ( folderName.tqfind( '/' ) != -1 && + if ( folderName.find( '/' ) != -1 && fldType != KMFolderTypeImap && fldType != KMFolderTypeCachedImap ) { message = i18n( "Folder names cannot contain the / (slash) character; please choose another folder name." ); @@ -928,7 +928,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) delimiter = ai->delimiterForFolder( mStorage ); } } - if ( !delimiter.isEmpty() && folderName.tqfind( delimiter ) != -1 ) { + if ( !delimiter.isEmpty() && folderName.find( delimiter ) != -1 ) { message = i18n( "Your IMAP server does not allow the character '%1'; please choose another folder name." ).tqarg( delimiter ); return false; } diff --git a/kmail/kmfolder.h b/kmail/kmfolder.h index 83a4a7a2f..67e77665e 100644 --- a/kmail/kmfolder.h +++ b/kmail/kmfolder.h @@ -260,8 +260,8 @@ public: int moveMsg(TQPtrList<KMMessage>, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - int tqfind(const KMMsgBase* msg) const; - int tqfind( const KMMessage * msg ) const; + int find(const KMMsgBase* msg) const; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ int count(bool cache = false) const; 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 ) ) ) { diff --git a/kmail/kmfoldercombobox.cpp b/kmail/kmfoldercombobox.cpp index e85144f0a..1135b25b7 100644 --- a/kmail/kmfoldercombobox.cpp +++ b/kmail/kmfoldercombobox.cpp @@ -114,9 +114,9 @@ void KMFolderComboBox::setFolder( KMFolder *aFolder ) TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); - int idx = folders.tqfindIndex( aFolder ); + int idx = folders.findIndex( aFolder ); if (idx == -1) - idx = folders.tqfindIndex( kmkernel->draftsFolder() ); + idx = folders.findIndex( kmkernel->draftsFolder() ); setCurrentItem( idx >= 0 ? idx : 0 ); mFolder = aFolder; diff --git a/kmail/kmfolderdir.cpp b/kmail/kmfolderdir.cpp index 32eb58343..1fd5dcd56 100644 --- a/kmail/kmfolderdir.cpp +++ b/kmail/kmfolderdir.cpp @@ -320,8 +320,8 @@ bool KMFolderDir::reload(void) // .foo.directory => foo TQString folderName = *it; - int right = folderName.tqfind( ".directory" ); - int left = folderName.tqfind( "." ); + int right = folderName.find( ".directory" ); + int left = folderName.find( "." ); Q_ASSERT( left != -1 && right != -1 ); folderName = folderName.mid( left + 1, right - 1 ); 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) ); } //----------------------------------------------------------------------------- diff --git a/kmail/kmfolderindex.h b/kmail/kmfolderindex.h index e8ef5e7b6..28743c497 100644 --- a/kmail/kmfolderindex.h +++ b/kmail/kmfolderindex.h @@ -68,8 +68,8 @@ public: virtual const KMMsgBase* getMsgBase(int idx) const { return mMsgList[idx]; } virtual KMMsgBase* getMsgBase(int idx) { return mMsgList[idx]; } - virtual int tqfind(const KMMsgBase* msg) const { return mMsgList.tqfind((KMMsgBase*)msg); } - int tqfind( const KMMessage * msg ) const { return FolderStorage::tqfind( msg ); } + virtual int find(const KMMsgBase* msg) const { return mMsgList.find((KMMsgBase*)msg); } + int find( const KMMessage * msg ) const { return FolderStorage::find( msg ); } /** Registered unique serial number for the index file */ int serialIndexId() const { return mIndexId; } diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp index fe19131fb..8c54e3c24 100644 --- a/kmail/kmfoldermaildir.cpp +++ b/kmail/kmfoldermaildir.cpp @@ -291,7 +291,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQS continue; // first, make sure this isn't in the 'new' subdir - if ( entryList.tqcontains( filename ) ) + if ( entryList.contains( filename ) ) moveInternal(subdirNew + filename, subdirCur + filename, mi); // construct a valid filename. if it's already valid, then @@ -381,7 +381,7 @@ if( fileD0.open( IO_WriteOnly ) ) { if (msgParent==folder() && !kmkernel->folderIsDraftOrOutbox(folder())) return 0; - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -596,7 +596,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // actually be some other state (but not New) if (status == KMMsgStatusRead) { - if (file.tqfind(":2,") == -1) + if (file.find(":2,") == -1) status = KMMsgStatusUnread; else if (file.right(5) == ":2,RS") status |= KMMsgStatusReplied; @@ -636,7 +636,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -644,7 +644,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -652,7 +652,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -660,10 +660,10 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -672,7 +672,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -697,7 +697,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -1046,7 +1046,7 @@ TQString KMFolderMaildir::constructValidFileName( const TQString & filename, if (!suffix_regex) suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$")); - aFileName.truncate(aFileName.tqfindRev(*suffix_regex)); + aFileName.truncate(aFileName.findRev(*suffix_regex)); // only add status suffix if the message is neither new nor unread if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) ) diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp index 75a584551..d77a8ae46 100644 --- a/kmail/kmfoldermbox.cpp +++ b/kmail/kmfoldermbox.cpp @@ -609,7 +609,7 @@ int KMFolderMbox::createIndexFromContents() msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -617,7 +617,7 @@ int KMFolderMbox::createIndexFromContents() replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -625,7 +625,7 @@ int KMFolderMbox::createIndexFromContents() referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -633,10 +633,10 @@ int KMFolderMbox::createIndexFromContents() } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -645,7 +645,7 @@ int KMFolderMbox::createIndexFromContents() // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -654,7 +654,7 @@ int KMFolderMbox::createIndexFromContents() charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -965,7 +965,7 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret ) return 0; } - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -1175,7 +1175,7 @@ int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfil mtext.resize(20); fread(mtext.data(), 20, 1, mStream); if(i <= 0) { //woops we've reached the top of the file, last try.. - if ( mtext.tqcontains( "from ", false ) ) { + if ( mtext.contains( "from ", false ) ) { if (mtext.size() < (size_t)folder_offset) mtext.resize(folder_offset); if(fseek(mStream, chunk_offset, SEEK_SET) == -1 || diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp index 383f562ac..e66e77761 100644 --- a/kmail/kmfoldermgr.cpp +++ b/kmail/kmfoldermgr.cpp @@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr, //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::tqfind(const TQString& folderName, bool foldersOnly) +KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly) { KMFolderNode* node; @@ -303,7 +303,7 @@ KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr, { KMFolder* folder = 0; if ( id == 0 ) - folder = tqfind(aFolderName); + folder = find(aFolderName); else folder = findById(id); diff --git a/kmail/kmfoldermgr.h b/kmail/kmfoldermgr.h index 0565157ad..01009347a 100644 --- a/kmail/kmfoldermgr.h +++ b/kmail/kmfoldermgr.h @@ -33,13 +33,13 @@ public: /** Searches folder and returns it. Skips directories (objects of type KMFolderDir) if foldersOnly is TRUE. */ - virtual KMFolder* tqfind(const TQString& folderName, bool foldersOnly=TRUE); + virtual KMFolder* find(const TQString& folderName, bool foldersOnly=TRUE); /** Searches for a folder with the given id, recurses into directories */ virtual KMFolder* findIdString(const TQString& folderId, const uint id = 0, KMFolderDir *dir = 0); - /** Uses tqfind() to find given folder. If not found the folder is + /** Uses find() to find given folder. If not found the folder is * created. Directories are skipped. * If an id is passed this searches for it */ diff --git a/kmail/kmfoldersearch.cpp b/kmail/kmfoldersearch.cpp index e7fd1d269..d2345dce0 100644 --- a/kmail/kmfoldersearch.cpp +++ b/kmail/kmfoldersearch.cpp @@ -452,7 +452,7 @@ void KMFolderSearch::addSerNum(TQ_UINT32 serNum) << ": folder is " << aFolder << ", index is " << idx << endl; return; } - if(mFolders.tqfindIndex(aFolder) == -1) { + if(mFolders.findIndex(aFolder) == -1) { aFolder->open("foldersearch"); mFolders.append(aFolder); } @@ -698,7 +698,7 @@ KMFolderSearch::ignoreJobsForMessage( KMMessage* msg ) } -int KMFolderSearch::tqfind(const KMMsgBase* msg) const +int KMFolderSearch::find(const KMMsgBase* msg) const { int pos = 0; TQ_UINT32 serNum = msg->getMsgSerNum(); @@ -856,7 +856,7 @@ bool KMFolderSearch::readIndex() return false; } mSerNums.push_back(serNum); - if(mFolders.tqfindIndex(folder) == -1) { + if(mFolders.findIndex(folder) == -1) { if (mInvalid) //exceptional case for when folder has invalid ids return false; folder->open("foldersearch"); @@ -910,7 +910,7 @@ KMMsgInfo* KMFolderSearch::setIndexEntry(int idx, KMMessage *msg) { assert(idx >= 0 && idx < (int)mSerNums.count()); Q_UNUSED( idx ); - return msg->storage()->setIndexEntry(msg->tqparent()->tqfind(msg), msg); + return msg->storage()->setIndexEntry(msg->tqparent()->find(msg), msg); } void KMFolderSearch::clearIndex(bool, bool) @@ -954,9 +954,9 @@ void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, TQ_UINT32 serNum) KMFolderOpener openFolder(folder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( folder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[folder]; - mFoldersCurrentlyBeingSearched.tqreplace( folder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count+1 ); } else { connect( folder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), @@ -978,7 +978,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, << " matches?" << matches << endl; KMFolderOpener openFolder(folder, "foldersearch"); - Q_ASSERT( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ); + Q_ASSERT( mFoldersCurrentlyBeingSearched.contains( folder ) ); unsigned int count = mFoldersCurrentlyBeingSearched[folder]; if ( count == 1 ) { @@ -990,7 +990,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.remove( folder ); } else { - mFoldersCurrentlyBeingSearched.tqreplace( folder, count-1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count-1 ); } if ( !matches ) { @@ -1115,9 +1115,9 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx) KMFolderOpener openAFolder(aFolder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( aFolder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( aFolder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[aFolder]; - mFoldersCurrentlyBeingSearched.tqreplace( aFolder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( aFolder, count+1 ); } else { connect( aFolder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), diff --git a/kmail/kmfoldersearch.h b/kmail/kmfoldersearch.h index 88e34994f..728eb6842 100644 --- a/kmail/kmfoldersearch.h +++ b/kmail/kmfoldersearch.h @@ -181,7 +181,7 @@ public: virtual bool isReadOnly() const; virtual const KMMsgBase* getMsgBase(int idx) const; virtual KMMsgBase* getMsgBase(int idx); - virtual int tqfind(const KMMsgBase* msg) const; + virtual int find(const KMMsgBase* msg) const; virtual TQString indexLocation() const; virtual int writeIndex( bool createEmptyIndex = false ); DwString getDwString(int idx); diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp index 32f6e3c44..6a280856f 100644 --- a/kmail/kmfoldertree.cpp +++ b/kmail/kmfoldertree.cpp @@ -136,7 +136,7 @@ TQPixmap KMFolderTreeItem::normalIcon(int size) const } // non-root search folders if ( protocol() == KMFolderTreeItem::Search ) { - icon = "mail_tqfind"; + icon = "mail_find"; } if ( mFolder && mFolder->noContent() ) { icon = "folder_grey"; @@ -1392,7 +1392,7 @@ void KMFolderTree::cleanupConfigFile() { if ((*grpIt).left(7) != "Folder-") continue; name = (*grpIt).mid(7); - if (folderMap.tqfind(name) == folderMap.end()) + if (folderMap.find(name) == folderMap.end()) { KMFolder* folder = kmkernel->findFolderById( name ); if ( folder ) { @@ -1634,8 +1634,8 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, else fldName = oldFldName; - fldName.tqreplace("/", ""); - fldName.tqreplace(TQRegExp("^\\."), ""); + fldName.replace("/", ""); + fldName.replace(TQRegExp("^\\."), ""); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -1648,7 +1648,7 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, void KMFolderTree::slotUpdateCountsDelayed(KMFolder * folder) { // kdDebug(5006) << "KMFolderTree::slotUpdateCountsDelayed()" << endl; - if ( !mFolderToUpdateCount.tqcontains( folder->idString() ) ) + if ( !mFolderToUpdateCount.contains( folder->idString() ) ) { // kdDebug( 5006 )<< "adding " << folder->idString() << " to updateCountList " << endl; mFolderToUpdateCount.insert( folder->idString(),folder ); @@ -1851,7 +1851,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if ( popup ) delete popup; else @@ -1897,7 +1897,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, continue; } TQString label = fti->text( 0 ); - label.tqreplace( "&","&&" ); + label.replace( "&","&&" ); if ( fti->firstChild() ) { // new level @@ -1985,7 +1985,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source if ( source ) sourceFolderName = source->label(); - if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.tqcontains( sourceFolderName ) ) { + if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.contains( sourceFolderName ) ) { KMessageBox::error( this, i18n("<qt>Cannot move or copy folder <b>%1</b> here because a folder with the same name already exists.</qt>") .tqarg( sourceFolderName ) ); setDragEnabled( true ); @@ -2016,7 +2016,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source while ( folderDir && ( folderDir != &kmkernel->folderMgr()->dir() ) && ( folderDir != source->tqparent() ) ) { - if ( folderDir->tqfindRef( source ) != -1 ) + if ( folderDir->findRef( source ) != -1 ) { KMessageBox::error( this, message ); setDragEnabled( true ); @@ -2027,7 +2027,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source } if( source && source->child() && tqparent && - ( tqparent->path().tqfind( source->child()->path() + "/" ) == 0 ) ) { + ( tqparent->path().find( source->child()->path() + "/" ) == 0 ) ) { KMessageBox::error( this, message ); setDragEnabled( true ); return; @@ -2051,7 +2051,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > source continue; KMFolderDir *childDir = (*it2)->tqparent(); do { - if ( parentDir == childDir || parentDir->tqfindRef( childDir->owner() ) != -1 ) { + if ( parentDir == childDir || parentDir->findRef( childDir->owner() ) != -1 ) { KMessageBox::error( this, i18n("Moving the selected folders is not possible") ); setDragEnabled( true ); return; @@ -2118,7 +2118,7 @@ void KMFolderTree::cutFolder() void KMFolderTree::pasteFolder() { KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>( currentItem() ); - if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.tqcontains( item->folder() ) ) { + if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.contains( item->folder() ) ) { moveOrCopyFolder( mCopySourceFolders, item->folder(), mCutFolder ); if ( mCutFolder ) mCopySourceFolders.clear(); diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp index f8e8fff8f..d8c30d074 100644 --- a/kmail/kmheaders.cpp +++ b/kmail/kmheaders.cpp @@ -952,7 +952,7 @@ void KMHeaders::msgAdded(int id) mItems[id] = hi; if ( !msgId.isEmpty() ) - mSortCacheItems.tqreplace(msgId, sci); + mSortCacheItems.replace(msgId, sci); /* Add to the list of potential parents for subject threading. But only if * we are top level. */ if (mSubjThreading && tqparent) { @@ -962,7 +962,7 @@ void KMHeaders::msgAdded(int id) subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); } if( !subjMD5.isEmpty()) { - if ( !mSubjectLists.tqfind(subjMD5) ) + if ( !mSubjectLists.find(subjMD5) ) mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); // insertion sort by date. See buildThreadTrees for details. int p=0; @@ -1006,7 +1006,7 @@ void KMHeaders::msgAdded(int id) if (msgId != otherMsg->replyToAuxIdMD5()) continue; else { - if (!otherId.isEmpty() && mSortCacheItems.tqfind(otherId)) + if (!otherId.isEmpty() && mSortCacheItems.find(otherId)) continue; else // Thread below us by aux id, but keep on the list of @@ -1163,11 +1163,11 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) } if ((!tqparent || sci->isImperfectlyThreaded()) - && !mImperfectlyThreadedList.tqcontainsRef(item)) + && !mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.append(item); if (tqparent && !sci->isImperfectlyThreaded() - && mImperfectlyThreadedList.tqcontainsRef(item)) + && mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.removeRef(item); } } @@ -1178,7 +1178,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) mImperfectlyThreadedList.removeRef( removedItem ); #ifdef DEBUG // This should never happen, in this case the folders are inconsistent. - while ( mImperfectlyThreadedList.tqfindRef( removedItem ) != -1 ) { + while ( mImperfectlyThreadedList.findRef( removedItem ) != -1 ) { mImperfectlyThreadedList.remove(); kdDebug(5006) << "Remove doubled item from mImperfectlyThreadedList: " << removedItem << endl; } @@ -1268,7 +1268,7 @@ void KMHeaders::setThreadtqStatus(KMMsgtqStatus status, bool toggle) TQListViewItem *top = item; while ( top->tqparent() ) top = top->tqparent(); - if (!topOfThreads.tqcontains(top)) { + if (!topOfThreads.contains(top)) { topOfThreads.append(top); } } @@ -2950,7 +2950,7 @@ void KMHeaders::buildThreadingTree( TQMemArray<SortCacheItem *> sortCache ) KMMsgBase *mi = mFolder->getMsgBase(x); TQString md5 = mi->msgIdMD5(); if(!md5.isEmpty()) - mSortCacheItems.tqreplace(md5, sortCache[x]); + mSortCacheItems.replace(md5, sortCache[x]); } } @@ -2974,7 +2974,7 @@ void KMHeaders::buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache /* For each subject, keep a list of items with that subject * (stripped of prefixes) sorted by date. */ - if (!mSubjectLists.tqfind(subjMD5)) + if (!mSubjectLists.find(subjMD5)) mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); /* Insertion sort by date. These lists are expected to be very small. * Also, since the messages are roughly ordered by date in the store, @@ -3596,7 +3596,7 @@ void KMHeaders::setCopiedMessages(const TQValueList< TQ_UINT32 > & msgs, bool mo bool KMHeaders::isMessageCut(TQ_UINT32 serNum) const { - return mMoveMessages && mCopiedMessages.tqcontains( serNum ); + return mMoveMessages && mCopiedMessages.contains( serNum ); } TQValueList< TQ_UINT32 > KMHeaders::selectedSernums() diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index 931d15ea7..7a05280e9 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -425,7 +425,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, for ( QCStringList::ConstIterator it = customHeaders.begin() ; it != customHeaders.end() ; ++it ) if ( !(*it).isEmpty() ) { - const int pos = (*it).tqfind( ':' ); + const int pos = (*it).find( ':' ); if ( pos > 0 ) { TQCString header, value; @@ -606,7 +606,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, void KMKernel::setDefaultTransport( const TQString & transport ) { TQStringList availTransports = KMail::TransportManager::transportNames(); - TQStringList::const_iterator it = availTransports.tqfind( transport ); + TQStringList::const_iterator it = availTransports.find( transport ); if ( it == availTransports.end() ) { kdWarning() << "The transport you entered is not available" << endl; return; @@ -814,7 +814,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, int retval; bool readFolderMsgIds = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { mAddMessageMsgIds.clear(); @@ -840,7 +840,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msg->fromString( messageText ); if (readFolderMsgIds) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -937,8 +937,8 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msgId += msg->dateStr(); } - int k = mAddMessageMsgIds.tqfindIndex( msgId ); - //fprintf(stderr,"tqfind %s = %d\n",(const char *) msgId,k); + int k = mAddMessageMsgIds.findIndex( msgId ); + //fprintf(stderr,"find %s = %d\n",(const char *) msgId,k); if ( k == -1 ) { if ( !msgId.isEmpty() ) { @@ -1000,7 +1000,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, bool createNewFolder = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { createNewFolder = true; @@ -1018,7 +1018,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, msg->fromString( messageText ); if (createNewFolder) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -1528,7 +1528,7 @@ void KMKernel::init() recreateCorruptIndexFiles(); the_searchFolderMgr = new KMFolderMgr(locateLocal("data","kmail/search"), KMSearchDir); - KMFolder *lsf = the_searchFolderMgr->tqfind( i18n("Last Search") ); + KMFolder *lsf = the_searchFolderMgr->find( i18n("Last Search") ); if (lsf) the_searchFolderMgr->remove( lsf ); @@ -1597,7 +1597,7 @@ void KMKernel::init() bool KMKernel::isCodecAsciiCompatible( const TQTextCodec *codec ) { - return !mNonAsciiCompatibleCodecs.tqcontains( codec ); + return !mNonAsciiCompatibleCodecs.contains( codec ); } void KMKernel::readConfig() @@ -1613,7 +1613,7 @@ void KMKernel::cleanupImapFolders() KMFolderNode *node = the_imapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "imap" )) ) { node = the_imapFolderMgr->dir().next(); @@ -1629,7 +1629,7 @@ void KMKernel::cleanupImapFolders() node = the_dimapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "cachedimap" )) ) { node = the_dimapFolderMgr->dir().next(); @@ -1665,7 +1665,7 @@ void KMKernel::cleanupImapFolders() if (acct->type() != "cachedimap" ) continue; - KMFolder* fld = the_dimapFolderMgr->tqfind(TQString::number(acct->id())); + KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id())); if( fld ) cfld = static_cast<KMFolderCachedImap*>( fld->storage() ); if (cfld == 0) { @@ -2016,7 +2016,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) { // send the data in 64 KB chunks const int MAX_CHUNK_SIZE = 64*1024; - TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); int remainingBytes = (*it).data.size() - (*it).offset; if( remainingBytes > MAX_CHUNK_SIZE ) @@ -2039,7 +2039,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) void KMKernel::slotResult(KIO::Job *job) { - TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.tqfind(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); if (job->error()) { @@ -2108,7 +2108,7 @@ bool KMKernel::haveSystemTrayApplet() bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) { - if ( systemTrayApplets.tqfindIndex( applet ) == -1 ) { + if ( systemTrayApplets.findIndex( applet ) == -1 ) { systemTrayApplets.append( applet ); return true; } @@ -2119,7 +2119,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet ) { TQValueList<const KSystemTray*>::iterator it = - systemTrayApplets.tqfind( applet ); + systemTrayApplets.find( applet ); if ( it != systemTrayApplets.end() ) { systemTrayApplets.remove( it ); return true; diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index fd41d4a89..a32c61c99 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -939,7 +939,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, for ( TQStringList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - kdDebug(5006) << newInFolder.tqfind( *it ).data() << " new message(s) in " + kdDebug(5006) << newInFolder.find( *it ).data() << " new message(s) in " << *it << endl; KMFolder *folder = kmkernel->findFolderById( *it ); @@ -949,7 +949,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, if ( GlobalSettings::self()->verboseNewMailNotification() ) { summary += "<br>" + i18n( "1 new message in %1", "%n new messages in %1", - newInFolder.tqfind( *it ).data() ) + newInFolder.find( *it ).data() ) .tqarg( folder->prettyURL() ); } } @@ -1028,7 +1028,7 @@ void KMMainWidget::slotShowNewFromTemplate() TQString subj = mb->subject(); if ( subj.isEmpty() ) subj = i18n("No Subject"); mTemplateMenu->popupMenu()->insertItem( - KStringHandler::rsqueeze( subj.tqreplace( "&", "&&" ) ), idx ); + KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx ); } } @@ -2165,7 +2165,7 @@ void KMMainWidget::slotSelectFolder(KMFolder* folder) //----------------------------------------------------------------------------- void KMMainWidget::slotSelectMessage(KMMessage* msg) { - int idx = mFolder->tqfind(msg); + int idx = mFolder->find(msg); if (idx != -1) { mHeaders->setCurrentMsg(idx); if (mMsgView) @@ -2189,9 +2189,9 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() { TQString msgId( oldMsg->msgId() ); TQString prefix("DecryptedMsg."); - int oldIdx = msgId.tqfind(prefix, 0, false); + int oldIdx = msgId.find(prefix, 0, false); if( -1 == oldIdx ) { - int leftAngle = msgId.tqfindRev( '<' ); + int leftAngle = msgId.findRev( '<' ); msgId = msgId.insert( (-1 == leftAngle) ? 0 : ++leftAngle, prefix ); } else { @@ -2210,12 +2210,12 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() kdDebug(5006) << "KMMainWidget - adding unencrypted message to folder" << endl; mFolder->addMsg( newMsg ); /* Figure out its index in the folder for selecting. This must be count()-1, - * since we append. Be safe and do tqfind, though, just in case. */ - int newMsgIdx = mFolder->tqfind( newMsg ); + * since we append. Be safe and do find, though, just in case. */ + int newMsgIdx = mFolder->find( newMsg ); Q_ASSERT( newMsgIdx != -1 ); /* we need this unget, to have the message displayed correctly initially */ mFolder->unGetMsg( newMsgIdx ); - int idx = mFolder->tqfind( oldMsg ); + int idx = mFolder->find( oldMsg ); Q_ASSERT( idx != -1 ); /* only select here, so the old one is not un-Gotten before, which would * render the pointer we hold invalid so that find would fail */ @@ -2468,7 +2468,7 @@ void KMMainWidget::getAccountMenu() TQStringList::Iterator it; int id = 0; for(it = actList.begin(); it != actList.end() ; ++it, id++) - mActMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2481,7 +2481,7 @@ void KMMainWidget::getTransportMenu() TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) - mSendMenu->insertItem((*it).tqreplace("&", "&&"), id); + mSendMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2545,7 +2545,7 @@ void KMMainWidget::updateCustomTemplateMenus() KAction *action; switch ( t.type() ) { case CustomTemplates::TReply: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2557,7 +2557,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyc; break; case CustomTemplates::TReplyAll: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2569,7 +2569,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyallc; break; case CustomTemplates::TForward: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++forwardc; break; case CustomTemplates::TUniversal: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2591,7 +2591,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2601,7 +2601,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyAllActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyallc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2767,10 +2767,10 @@ void KMMainWidget::setupActions() TQT_SLOT(slotDeleteThread()), actionCollection(), "delete_thread" ); - (void) new KAction( i18n("&Find Messages..."), "mail_tqfind", Key_S, TQT_TQOBJECT(this), + (void) new KAction( i18n("&Find Messages..."), "mail_find", Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" ); - mFindInMessageAction = new KAction( i18n("&Find in Message..."), "tqfind", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), + mFindInMessageAction = new KAction( i18n("&Find in Message..."), "find", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), TQT_SLOT(slotFind()), actionCollection(), "find_in_messages" ); (void) new KAction( i18n("Select &All Messages"), KStdAccel::selectAll(), TQT_TQOBJECT(this), @@ -3608,7 +3608,7 @@ void KMMainWidget::removeDuplicates() if ( !id.isEmpty() ) { TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); int other = -1; - if ( idMD5s.tqcontains(id) ) + if ( idMD5s.contains(id) ) other = idMD5s[id].first(); else idMD5s[id].append( i ); @@ -3713,7 +3713,7 @@ void KMMainWidget::initializeFilterActions() for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) { if (!(*it)->isEmpty() && (*it)->configureShortcut()) { filterName = TQString("Filter %1").tqarg((*it)->name()); - normalizedName = filterName.tqreplace(" ", "_"); + normalizedName = filterName.replace(" ", "_"); if (action(normalizedName.utf8())) continue; filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this); @@ -3803,7 +3803,7 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder ) TQString actionlabel = TQString( "FolderShortcut %1").tqarg( folder->prettyURL() ); TQString actionname = TQString( "FolderShortcut %1").tqarg( folder->idString() ); - TQString normalizedName = actionname.tqreplace(" ", "_"); + TQString normalizedName = actionname.replace(" ", "_"); KAction* action = new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); diff --git a/kmail/kmmainwin.cpp b/kmail/kmmainwin.cpp index c2cb135ec..8e14e984a 100644 --- a/kmail/kmmainwin.cpp +++ b/kmail/kmmainwin.cpp @@ -122,9 +122,9 @@ void KMMainWin::displayStatusMsg(const TQString& aText) // ### FIXME: We should disable richtext/HTML (to avoid possible denial of service attacks), // but this code would double the size of the satus bar if the user hovers // over an <foo@bar.com>-style email address :-( -// text.tqreplace("&", "&"); -// text.tqreplace("<", "<"); -// text.tqreplace(">", ">"); +// text.replace("&", "&"); +// text.replace("<", "<"); +// text.replace(">", ">"); statusBar()->changeItem(text, mMessageStatusId); } diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp index c083638d3..d4ef0ec49 100644 --- a/kmail/kmmessage.cpp +++ b/kmail/kmmessage.cpp @@ -246,10 +246,10 @@ bool KMMessage::transferInProgress() const void KMMessage::setTransferInProgress(bool value, bool force) { MessageProperty::setTransferInProgress( getMsgSerNum(), value, force ); - if ( !transferInProgress() && sPendingDeletes.tqcontains( this ) ) { + if ( !transferInProgress() && sPendingDeletes.contains( this ) ) { sPendingDeletes.remove( this ); if ( tqparent() ) { - int idx = tqparent()->tqfind( this ); + int idx = tqparent()->find( this ); if ( idx > 0 ) { tqparent()->removeMsg( idx ); } @@ -260,7 +260,7 @@ void KMMessage::setTransferInProgress(bool value, bool force) bool KMMessage::isUrgent() const { - return headerField( "Priority" ).tqcontains( "urgent", false ) + return headerField( "Priority" ).contains( "urgent", false ) || headerField( "X-Priority" ).startsWith( "2" ); } @@ -641,9 +641,9 @@ static bool flushPart(TQString &msg, TQStringList &part, static TQString stripSignature( const TQString & msg, bool clearSigned ) { if ( clearSigned ) - return msg.left( msg.tqfindRev( TQRegExp( "\n--\\s?\n" ) ) ); + return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) ); else - return msg.left( msg.tqfindRev( "\n-- \n" ) ); + return msg.left( msg.findRev( "\n-- \n" ) ); } TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength ) @@ -845,14 +845,14 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr, asPlainText( aStripSignature, allowDecryption ) : selection ; // Remove blank lines at the beginning: - const int firstNonWS = content.tqfind( TQRegExp( "\\S" ) ); - const int lineStart = content.tqfindRev( '\n', firstNonWS ); + const int firstNonWS = content.find( TQRegExp( "\\S" ) ); + const int lineStart = content.findRev( '\n', firstNonWS ); if ( lineStart >= 0 ) content.remove( 0, static_cast<unsigned int>( lineStart ) ); const TQString indentStr = formatString( aIndentStr ); - content.tqreplace( '\n', '\n' + indentStr ); + content.replace( '\n', '\n' + indentStr ); content.prepend( indentStr ); content += '\n'; @@ -887,7 +887,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, !tqparent()->mailingListPostAddress().isEmpty() ) { mailingListAddresses << tqparent()->mailingListPostAddress(); } - if ( headerField("List-Post").tqfind( "mailto:", 0, false ) != -1 ) { + if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) { TQString listPost = headerField("List-Post"); TQRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false ); if ( rx.search( listPost, 0 ) != -1 ) // matched @@ -1108,14 +1108,14 @@ TQCString KMMessage::getRefStr() const if (refStr.isEmpty()) return headerField("Message-Id").latin1(); - i = refStr.tqfind('<'); - j = refStr.tqfind('>'); + i = refStr.find('<'); + j = refStr.find('>'); firstRef = refStr.mid(i, j-i+1); if (!firstRef.isEmpty()) retRefStr = firstRef + ' '; - i = refStr.tqfindRev('<'); - j = refStr.tqfindRev('>'); + i = refStr.findRev('<'); + j = refStr.findRev('>'); lastRef = refStr.mid(i, j-i+1); if (!lastRef.isEmpty() && lastRef != firstRef) @@ -1215,8 +1215,8 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList ) while (field) { nextField = field->Next(); - if ( field->FieldNameStr().tqfind( "ontent" ) == DwString::npos - && !whiteList.tqcontains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) + if ( field->FieldNameStr().find( "ontent" ) == DwString::npos + && !whiteList.contains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) header.RemoveField(field); field = nextField; } @@ -1245,7 +1245,7 @@ KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString() */ ) TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding(); for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) { TQString entry = (*it); - int sep = entry.tqfind( '/' ); + int sep = entry.find( '/' ); TQCString type = entry.left( sep ).latin1(); TQCString subtype = entry.mid( sep+1 ).latin1(); kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl; @@ -1442,7 +1442,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // an MDN with any disposition type other than "failed" in response // to the request. TQString notificationOptions = headerField("Disposition-Notification-Options"); - if ( notificationOptions.tqcontains( "required", false ) ) { + if ( notificationOptions.contains( "required", false ) ) { // ### hacky; should parse... // There is a required option that we don't understand. We need to // ask the user what we should do: @@ -1476,7 +1476,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, TQString returnPath = returnPathList.isEmpty() ? TQString() : returnPathList.front().localPart + '@' + returnPathList.front().domain ; kdDebug(5006) << "clean return path: " << returnPath << endl; - if ( returnPath.isEmpty() || !receiptTo.tqcontains( returnPath, false ) ) { + if ( returnPath.isEmpty() || !receiptTo.contains( returnPath, false ) ) { if ( !allowGUI ) return 0; // don't setMDNSentState here! mode = requestAdviceOnMDN( returnPath.isEmpty() ? "mdnReturnPathEmpty" : @@ -1618,13 +1618,13 @@ TQString KMMessage::replaceHeadersInString( const TQString & s ) const { int idx = 0; if( ( idx = rxDate.search( result, idx ) ) != -1 ) { - result.tqreplace( idx, rxDate.matchedLength(), sDate ); + result.replace( idx, rxDate.matchedLength(), sDate ); } idx = 0; while ( ( idx = rx.search( result, idx ) ) != -1 ) { TQString replacement = headerField( TQString(rx.cap(1)).latin1() ); - result.tqreplace( idx, rx.matchedLength(), replacement ); + result.replace( idx, rx.matchedLength(), replacement ); idx += replacement.length(); } return result; @@ -2081,11 +2081,11 @@ TQString KMMessage::replyToId() const replyTo = headerField("In-Reply-To"); // search the end of the (first) message id in the In-Reply-To header - rightAngle = replyTo.tqfind( '>' ); + rightAngle = replyTo.find( '>' ); if (rightAngle != -1) replyTo.truncate( rightAngle + 1 ); // now search the start of the message id - leftAngle = replyTo.tqfindRev( '<' ); + leftAngle = replyTo.findRev( '<' ); if (leftAngle != -1) replyTo = replyTo.mid( leftAngle ); @@ -2094,14 +2094,14 @@ TQString KMMessage::replyToId() const // misconfigured Mutt. They look like this <"from foo"@bar.baz>, i.e. // they contain double quotes and spaces. We only check for '"'. if (!replyTo.isEmpty() && (replyTo[0] == '<') && - ( -1 == replyTo.tqfind( '"' ) ) ) + ( -1 == replyTo.find( '"' ) ) ) return replyTo; references = headerField("References"); - leftAngle = references.tqfindRev( '<' ); + leftAngle = references.findRev( '<' ); if (leftAngle != -1) references = references.mid( leftAngle ); - rightAngle = references.tqfind( '>' ); + rightAngle = references.find( '>' ); if (rightAngle != -1) references.truncate( rightAngle + 1 ); @@ -2126,11 +2126,11 @@ TQString KMMessage::references() const TQString references = headerField( "References" ); // keep the last two entries for threading - leftAngle = references.tqfindRev( '<' ); - leftAngle = references.tqfindRev( '<', leftAngle - 1 ); + leftAngle = references.findRev( '<' ); + leftAngle = references.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) references = references.mid( leftAngle ); - rightAngle = references.tqfindRev( '>' ); + rightAngle = references.findRev( '>' ); if( rightAngle != -1 ) references.truncate( rightAngle + 1 ); @@ -2146,7 +2146,7 @@ TQString KMMessage::replyToAuxIdMD5() const TQString result = references(); // references contains two items, use the first one // (the second to last reference) - const int rightAngle = result.tqfind( '>' ); + const int rightAngle = result.find( '>' ); if( rightAngle != -1 ) result.truncate( rightAngle + 1 ); @@ -2182,11 +2182,11 @@ TQString KMMessage::msgId() const TQString msgId = headerField("Message-Id"); // search the end of the message id - const int rightAngle = msgId.tqfind( '>' ); + const int rightAngle = msgId.find( '>' ); if (rightAngle != -1) msgId.truncate( rightAngle + 1 ); // now search the start of the message id - const int leftAngle = msgId.tqfindRev( '<' ); + const int leftAngle = msgId.findRev( '<' ); if (leftAngle != -1) msgId = msgId.mid( leftAngle ); return msgId; @@ -3197,8 +3197,8 @@ bool KMMessage::deleteBodyPart( int partIndex ) dummyPart.setContentDescription( comment ); dummyPart.setBodyEncodedBinary( TQByteArray() ); TQCString cd = dummyPart.contentDisposition(); - if ( cd.tqfind( "inline", 0, false ) == 0 ) { - cd.tqreplace( 0, 10, "attachment" ); + if ( cd.find( "inline", 0, false ) == 0 ) { + cd.replace( 0, 10, "attachment" ); dummyPart.setContentDisposition( cd ); } else if ( cd.isEmpty() ) { dummyPart.setContentDisposition( "attachment" ); @@ -3251,14 +3251,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) int iL, i1, i2, iM; iL = additionalParam.length(); i1 = 0; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); while ( i1 < iL ) { if( -1 == i2 ) i2 = iL; if( i1+1 < i2 ) { parAV = additionalParam.mid( i1, (i2-i1) ); - iM = parAV.tqfind('='); + iM = parAV.find('='); if( -1 < iM ) { parA = parAV.left( iM ).data(); @@ -3281,7 +3281,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) ct.AddParameter( param ); } i1 = i2+1; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); } } @@ -3975,7 +3975,7 @@ TQString KMMessage::expandAliases( const TQString& recipients ) // check whether the address is missing the domain part // FIXME: looking for '@' might be wrong - if ( receiver.tqfind('@') == -1 ) { + if ( receiver.find('@') == -1 ) { KConfigGroup general( KMKernel::config(), "General" ); TQString defaultdomain = general.readEntry( "Default domain" ); if( !defaultdomain.isEmpty() ) { @@ -4014,8 +4014,8 @@ TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName ) const KUser user( loginName ); if ( user.isValid() ) { TQString fullName = user.fullName(); - if ( fullName.tqfind( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) - address = '"' + fullName.tqreplace( '\\', "\\" ).tqreplace( '"', "\\" ) + if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) + address = '"' + fullName.replace( '\\', "\\" ).replace( '"', "\\" ) + "\" <" + address + '>'; else address = fullName + " <" + address + '>'; diff --git a/kmail/kmmessage.h b/kmail/kmmessage.h index 32e79e2ad..e15732b95 100644 --- a/kmail/kmmessage.h +++ b/kmail/kmmessage.h @@ -713,7 +713,7 @@ public: bool removeLineBreaks = false ); /** Converts the email address(es) to (a) nice HTML mailto: anchor(s). - * If stripped is TRUE then the visible part of the anchor tqcontains + * If stripped is TRUE then the visible part of the anchor contains * only the name part and not the given emailAddr. */ static TQString emailAddrAsAnchor(const TQString& emailAddr, diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index eb8ed59e0..e69dcdfb0 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -142,7 +142,7 @@ void KMMsgBase::toggletqStatus(const KMMsgtqStatus atqStatus, int idx) } if (storage()) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged(this, idx); } @@ -258,7 +258,7 @@ void KMMsgBase::setqStatus(const KMMsgtqStatus atqStatus, int idx) if ( oldtqStatus != mtqStatus && storage() ) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged( this, idx ); } @@ -608,7 +608,7 @@ TQStringList KMMsgBase::supportedEncodings(bool usAscii) { TQTextCodec *codec = KGlobal::charsets()->codecForName(*it); TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it); - if (mimeNames.tqfind(mimeName) == mimeNames.end()) + if (mimeNames.find(mimeName) == mimeNames.end()) { encodings.append(KGlobal::charsets()->languageForEncoding(*it) + " ( " + mimeName + " )"); @@ -665,7 +665,7 @@ TQString KMMsgBase::decodeRFC2047String(const TQCString& aStr, TQCString prefCha if ( str.isEmpty() ) return TQString(); - if ( str.tqfind( "=?" ) < 0 ) { + if ( str.find( "=?" ) < 0 ) { if ( !prefCharset.isEmpty() && kmkernel->isCodecAsciiCompatible( KMMsgBase::codecForName( prefCharset ) ) ) { if ( prefCharset == "us-ascii" ) { @@ -813,7 +813,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, start = pos; p = pos; while (p < strLength) { - if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.tqfind(_str.tqat(p)) != -1)) + if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.find(_str.tqat(p)) != -1)) start = p + 1; if (_str.tqat(p).tqunicode() >= 128 || _str.tqat(p).tqunicode() < 32) break; @@ -821,9 +821,9 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, } if (breakLine || p < strLength) { - while (dontQuote.tqfind(_str.tqat(start)) != -1) start++; + while (dontQuote.find(_str.tqat(start)) != -1) start++; stop = start; - while (stop < strLength && dontQuote.tqfind(_str.tqat(stop)) == -1) + while (stop < strLength && dontQuote.find(_str.tqat(stop)) == -1) stop++; result += _str.mid(pos, start - pos).latin1(); encLength = encodeRFC2047Quoted(codec->fromUnicode(_str. @@ -849,7 +849,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, if (result.right(5) == "?=\n ") { start--; result.truncate(result.length() - 1); } - int lastNewLine = result.tqfindRev("\n "); + int lastNewLine = result.findRev("\n "); if (!result.mid(lastNewLine).stripWhiteSpace().isEmpty() && result.length() - lastNewLine + encLength + 2 > maxLen) result += "\n "; @@ -946,12 +946,12 @@ TQCString KMMsgBase::encodeRFC2231StringAutoDetectCharset( const TQString &str, //----------------------------------------------------------------------------- TQString KMMsgBase::decodeRFC2231String(const TQCString& _str) { - int p = _str.tqfind('\''); + int p = _str.find('\''); if (p < 0) return kmkernel->networkCodec()->toUnicode(_str); TQCString charset = _str.left(p); - TQCString st = _str.mid(_str.tqfindRev('\'') + 1); + TQCString st = _str.mid(_str.findRev('\'') + 1); char ch, ch2; p = 0; while (p < (int)st.length()) @@ -996,10 +996,10 @@ TQCString KMMsgBase::extractRFC2231HeaderField( const TQCString &aStr, const TQC // Quoted values end at the ending quote if ( aStr[startPart] == '"' ) { startPart++; // the double quote isn't part of the filename - endPart = aStr.tqfind('"', startPart) - 1; + endPart = aStr.find('"', startPart) - 1; } else { - endPart = aStr.tqfind(';', startPart) - 1; + endPart = aStr.find(';', startPart) - 1; } if (endPart < 0) endPart = 32767; @@ -1081,7 +1081,7 @@ unsigned long KMMsgBase::getMsgSerNum() const if (msn) return msn; if (mParent) { - int index = mParent->tqfind((KMMsgBase*)this); + int index = mParent->find((KMMsgBase*)this); msn = KMMsgDict::instance()->getMsgSerNum(mParent, index); if (msn) MessageProperty::setSerialCache( this, msn ); @@ -1450,11 +1450,11 @@ void KMMsgBase::readConfig() sReplySubjPrefixes = composerGroup.readListEntry("reply-prefixes", ','); if (sReplySubjPrefixes.isEmpty()) sReplySubjPrefixes << "Re\\s*:" << "Re\\[\\d+\\]:" << "Re\\d+:"; - sReplaceSubjPrefix = composerGroup.readBoolEntry("tqreplace-reply-prefix", true); + sReplaceSubjPrefix = composerGroup.readBoolEntry("replace-reply-prefix", true); sForwardSubjPrefixes = composerGroup.readListEntry("forward-prefixes", ','); if (sForwardSubjPrefixes.isEmpty()) sForwardSubjPrefixes << "Fwd:" << "FW:"; - sReplaceForwSubjPrefix = composerGroup.readBoolEntry("tqreplace-forward-prefix", true); + sReplaceForwSubjPrefix = composerGroup.readBoolEntry("replace-forward-prefix", true); } //----------------------------------------------------------------------------- @@ -1469,7 +1469,7 @@ TQString KMMsgBase::stripOffPrefixes( const TQString& str ) // static TQString KMMsgBase::replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ) { bool recognized = false; @@ -1489,8 +1489,8 @@ TQString KMMsgBase::replacePrefixes( const TQString& str, TQString tmp = str; if ( rx.search( tmp ) == 0 ) { recognized = true; - if ( tqreplace ) - return tmp.tqreplace( 0, rx.matchedLength(), newPrefix + ' ' ); + if ( replace ) + return tmp.replace( 0, rx.matchedLength(), newPrefix + ' ' ); } } if ( !recognized ) @@ -1508,10 +1508,10 @@ TQString KMMsgBase::cleanSubject() const //----------------------------------------------------------------------------- TQString KMMsgBase::cleanSubject( const TQStringList & prefixRegExps, - bool tqreplace, + bool replace, const TQString & newPrefix ) const { - return KMMsgBase::replacePrefixes( subject(), prefixRegExps, tqreplace, + return KMMsgBase::replacePrefixes( subject(), prefixRegExps, replace, newPrefix ); } diff --git a/kmail/kmmsgbase.h b/kmail/kmmsgbase.h index e3bf0029c..94d5d966e 100644 --- a/kmail/kmmsgbase.h +++ b/kmail/kmmsgbase.h @@ -414,7 +414,7 @@ public: **/ static TQString replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ); /** Returns @p str with all "forward" and "reply" prefixes stripped off. @@ -427,7 +427,7 @@ public: sequence of whitespace-delimited prefixes at the beginning of #subject() is replaced by @p newPrefix **/ - TQString cleanSubject(const TQStringList& prefixRegExps, bool tqreplace, + TQString cleanSubject(const TQStringList& prefixRegExps, bool replace, const TQString& newPrefix) const; /** Return this mails subject, with all "forward" and "reply" diff --git a/kmail/kmmsgdict.cpp b/kmail/kmmsgdict.cpp index 223a8adf9..f49437928 100644 --- a/kmail/kmmsgdict.cpp +++ b/kmail/kmmsgdict.cpp @@ -215,15 +215,15 @@ unsigned long KMMsgDict::insert(unsigned long msgSerNum, } if (index == -1) - index = folder->tqfind(msg); + index = folder->find(msg); // Should not happen, indicates id file corruption - while (dict->tqfind((long)msn)) { + while (dict->find((long)msn)) { msn = getNextMsgSerNum(); folder->setDirty( true ); // rewrite id file } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry(folder->folder(), index); dict->insert((long)msn, entry); @@ -246,12 +246,12 @@ unsigned long KMMsgDict::insert(const KMMsgBase *msg, int index) //----------------------------------------------------------------------------- -void KMMsgDict::tqreplace(unsigned long msgSerNum, +void KMMsgDict::replace(unsigned long msgSerNum, const KMMsgBase *msg, int index) { KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() ); if ( !folder ) { - kdDebug(5006) << "KMMsgDict::tqreplace: Cannot replace the message serial " + kdDebug(5006) << "KMMsgDict::replace: Cannot replace the message serial " << "number, null pointer to storage. Requested serial: " << msgSerNum << endl; kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: " @@ -260,7 +260,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, } if ( index == -1 ) - index = folder->tqfind( msg ); + index = folder->find( msg ); remove( msgSerNum ); KMMsgDictEntry *entry = new KMMsgDictEntry( folder->folder(), index ); @@ -279,7 +279,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, void KMMsgDict::remove(unsigned long msgSerNum) { long key = (long)msgSerNum; - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind(key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find(key); if (!entry) return; @@ -319,7 +319,7 @@ void KMMsgDict::update(const KMMsgBase *msg, int index, int newIndex) void KMMsgDict::getLocation(unsigned long key, KMFolder **retFolder, int *retIndex) const { - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind((long)key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find((long)key); if (entry) { *retFolder = (KMFolder *)entry->folder; *retIndex = entry->index; @@ -448,7 +448,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) if (swapByteOrder) msn = kmail_swap_32(msn); - if (!readOk || dict->tqfind(msn)) { + if (!readOk || dict->find(msn)) { for (unsigned int i = 0; i < index; i++) { msn = rentry->getMsn(i); dict->remove((long)msn); @@ -468,7 +468,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) Q_ASSERT( msn != 0 ); } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry( storage.folder(), index); dict->insert((long)msn, entry); diff --git a/kmail/kmmsgdict.h b/kmail/kmmsgdict.h index a13165340..60fabf6c8 100644 --- a/kmail/kmmsgdict.h +++ b/kmail/kmmsgdict.h @@ -97,7 +97,7 @@ private: unsigned long insert(const KMMsgBase *msg, int index = -1); /** Set the serial number of @p msg to @p msgSerNum */ - void tqreplace(unsigned long msgSerNum, + void replace(unsigned long msgSerNum, const KMMsgBase *msg, int index = -1); /** Removes a message. */ diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp index 9e71f285d..447993db8 100644 --- a/kmail/kmmsgpart.cpp +++ b/kmail/kmmsgpart.cpp @@ -45,7 +45,7 @@ KMMessagePart::KMMessagePart( TQDataStream & stream ) KPIM::kAsciiToUpper( mOriginalContentTypeStr.data() ); // set the type - int sep = mOriginalContentTypeStr.tqfind('/'); + int sep = mOriginalContentTypeStr.find('/'); mType = mOriginalContentTypeStr.left(sep); mSubtype = mOriginalContentTypeStr.mid(sep+1); @@ -406,7 +406,7 @@ TQCString KMMessagePart::bodyDecoded(void) const //kdWarning( result.length() != (unsigned int)len, 5006 ) // << "KMMessagePart::bodyDecoded(): body is binary but used as text!" << endl; - result = result.tqreplace( "\r\n", "\n" ); // CRLF -> LF conversion + result = result.replace( "\r\n", "\n" ); // CRLF -> LF conversion assert( mBodyDecodedSize < 0 || mBodyDecodedSize == len ); if ( mBodyDecodedSize < 0 ) @@ -425,7 +425,7 @@ void KMMessagePart::magicSetType(bool aAutoDecode) KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body ); TQString mimetype = result->mimeType(); - const int sep = mimetype.tqfind('/'); + const int sep = mimetype.find('/'); mType = mimetype.left(sep).latin1(); mSubtype = mimetype.mid(sep+1).latin1(); } @@ -558,7 +558,7 @@ TQString KMMessagePart::fileName(void) const // Allow for multiple filname*0, filename*1, ... params (defined by RFC 2231) // in the Content-Disposision - if ( mContentDisposition.tqcontains( "filename*", false ) ) { + if ( mContentDisposition.contains( "filename*", false ) ) { // It's RFC 2231 encoded, so extract the file name with the 2231 method str = KMMsgBase::extractRFC2231HeaderField( mContentDisposition, "filename" ); @@ -568,7 +568,7 @@ TQString KMMessagePart::fileName(void) const // Standard RFC 2047-encoded // search the start of the filename - int startOfFilename = mContentDisposition.tqfind("filename=", 0, false); + int startOfFilename = mContentDisposition.find("filename=", 0, false); if (startOfFilename < 0) return TQString(); startOfFilename += 9; @@ -577,10 +577,10 @@ TQString KMMessagePart::fileName(void) const int endOfFilename; if ( '"' == mContentDisposition[startOfFilename] ) { startOfFilename++; // the double quote isn't part of the filename - endOfFilename = mContentDisposition.tqfind('"', startOfFilename) - 1; + endOfFilename = mContentDisposition.find('"', startOfFilename) - 1; } else { - endOfFilename = mContentDisposition.tqfind(';', startOfFilename) - 1; + endOfFilename = mContentDisposition.find(';', startOfFilename) - 1; } if (endOfFilename < 0) endOfFilename = 32767; diff --git a/kmail/kmmsgpartdlg.cpp b/kmail/kmmsgpartdlg.cpp index a56bee17d..167ff8deb 100644 --- a/kmail/kmmsgpartdlg.cpp +++ b/kmail/kmmsgpartdlg.cpp @@ -370,7 +370,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart ) setMimeType( mMsgPart->typeStr(), mMsgPart->subtypeStr() ); setSize( mMsgPart->decodedSize() ); setInline( mMsgPart->contentDisposition() - .tqfind( TQRegExp("^\\s*inline", false) ) >= 0 ); + .find( TQRegExp("^\\s*inline", false) ) >= 0 ); } @@ -396,7 +396,7 @@ void KMMsgPartDialogCompat::applyChanges() if ( name != TQString( encName ) ) cDisp += "*=" + encName; else - cDisp += "=\"" + encName.tqreplace( '\\', "\\\\" ).tqreplace( '"', "\\\"" ) + '"'; + cDisp += "=\"" + encName.replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"'; mMsgPart->setContentDisposition( cDisp ); } @@ -408,7 +408,7 @@ void KMMsgPartDialogCompat::applyChanges() // apply Content-Type: TQCString type = mimeType().latin1(); TQCString subtype; - int idx = type.tqfind('/'); + int idx = type.find('/'); if ( idx < 0 ) subtype = ""; else { diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp index b8937dc06..19f0410a9 100644 --- a/kmail/kmreaderwin.cpp +++ b/kmail/kmreaderwin.cpp @@ -1694,7 +1694,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, return TQString(); // strip off a leading path - int slashPos = fileName.tqfindRev( '/' ); + int slashPos = fileName.findRev( '/' ); if( -1 != slashPos ) fileName = fileName.mid( slashPos + 1 ); if( fileName.isEmpty() ) @@ -1764,8 +1764,8 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl) if (!aUrl.isLocalFile()) return -1; TQString path = aUrl.path(); - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); @@ -1845,15 +1845,15 @@ bool foundSMIMEData( const TQString aUrl, displayName = ""; libName = ""; keyId = ""; - int i1 = aUrl.tqfind( showCertMan ); + int i1 = aUrl.find( showCertMan ); if( -1 < i1 ) { i1 += showCertMan.length(); - int i2 = aUrl.tqfind(" ### ", i1); + int i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { displayName = aUrl.mid( i1, i2-i1 ); i1 = i2+5; - i2 = aUrl.tqfind(" ### ", i1); + i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { libName = aUrl.mid( i1, i2-i1 ); @@ -2577,8 +2577,8 @@ KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node ) while ( it != end ) { TQString path = *it; it++; - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp index 4af3d68a0..4c4340a2b 100644 --- a/kmail/kmsearchpattern.cpp +++ b/kmail/kmsearchpattern.cpp @@ -33,7 +33,7 @@ using KMail::FilterLog; #include <assert.h> static const char* funcConfigNames[] = - { "tqcontains", "tqcontains-not", "equals", "not-equal", "regexp", + { "contains", "contains-not", "equals", "not-equal", "regexp", "not-regexp", "greater", "less-or-equal", "less", "greater-or-equal", "is-in-addressbook", "is-not-in-addressbook" , "is-in-category", "is-not-in-category", "has-attachment", "has-no-attachment"}; @@ -281,10 +281,10 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, rc = ( ( function() & 1 ) == 1 ); else { start += headerLen; - size_t stop = aStr.tqfind( '\n', start ); + size_t stop = aStr.find( '\n', start ); char ch = '\0'; while ( stop != DwString::npos && ( ( ch = aStr.at( stop + 1 ) ) == ' ' || ch == '\t' ) ) - stop = aStr.tqfind( '\n', stop + 1 ); + stop = aStr.find( '\n', stop + 1 ); const int len = stop == DwString::npos ? aStr.length() - start : stop - start ; const TQCString codedValue( aStr.data() + start, len + 1 ); const TQString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support. @@ -294,11 +294,11 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, static const DwBoyerMoore to("\nTo: "); static const DwBoyerMoore cc("\nCc: "); static const DwBoyerMoore bcc("\nBcc: "); - // <recipients> "tqcontains" "foo" is true if any of the fields tqcontains + // <recipients> "contains" "foo" is true if any of the fields contains // "foo", while <recipients> "does not contain" "foo" is true if none - // of the fields tqcontains "foo" + // of the fields contains "foo" if ( ( function() & 1 ) == 0 ) { - // positive function, e.g. "tqcontains" + // positive function, e.g. "contains" rc = ( matches( aStr, msg, &to, 2 ) || matches( aStr, msg, &cc, 2 ) || matches( aStr, msg, &bcc, 3 ) ); @@ -419,10 +419,10 @@ bool KMSearchRuleString::matchesInternal( const TQString & msgContents ) const return ( TQString::compare( msgContents.lower(), contents().lower() ) != 0 ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { @@ -576,10 +576,10 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, return ( numericalValue != numericalMsgContents ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { diff --git a/kmail/kmsearchpattern.h b/kmail/kmsearchpattern.h index 4c2cb75de..87533a250 100644 --- a/kmail/kmsearchpattern.h +++ b/kmail/kmsearchpattern.h @@ -90,7 +90,7 @@ public: /** Determine whether the rule is worth considering. It isn't if either the field is not set or the contents is empty. - KFilter should make sure that it's rule list tqcontains + KFilter should make sure that it's rule list contains only non-empty rules, as matches doesn't check this. */ virtual bool isEmpty() const = 0; @@ -299,7 +299,7 @@ public: under which it could be stored in the config file. As a TQPtrList with autoDelete enabled, it assumes that it is the - central repository for the rules it tqcontains. So if you want to + central repository for the rules it contains. So if you want to reuse a rule in another pattern, make a deep copy of that rule. @short An abstraction of a search over messages. diff --git a/kmail/kmsender.cpp b/kmail/kmsender.cpp index add465642..987e4928a 100644 --- a/kmail/kmsender.cpp +++ b/kmail/kmsender.cpp @@ -404,7 +404,7 @@ void KMSender::doSendMsg() if (mCurrentMsg->tqparent() && !imapSentFolder) { // for speed optimization, this code assumes that mCurrentMsg is the // last one in it's tqparent folder; make sure that's really the case: - assert( mCurrentMsg->tqparent()->tqfind( mCurrentMsg ) + assert( mCurrentMsg->tqparent()->find( mCurrentMsg ) == mCurrentMsg->tqparent()->count() - 1 ); // unGet this message: mCurrentMsg->tqparent()->unGetMsg( mCurrentMsg->tqparent()->count() -1 ); @@ -710,7 +710,7 @@ void KMSender::slotIdle() mFailedMessages++; // reset cached password TQMapIterator <TQString,TQString> pc; - if ( (pc = mPasswdCache.tqfind( mMethodStr )) != mPasswdCache.end() ) { + if ( (pc = mPasswdCache.find( mMethodStr )) != mPasswdCache.end() ) { mPasswdCache.erase(pc); } // Sending of message failed. @@ -800,7 +800,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "NONE"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -815,7 +815,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "ssl"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -1019,7 +1019,7 @@ void KMSendSendmail::receivedStderr(KProcess *proc, char *buffer, int buflen) { assert(proc!=0); Q_UNUSED( proc ); - mLastErrorMessage.tqreplace(mLastErrorMessage.length(), buflen, buffer); + mLastErrorMessage.replace(mLastErrorMessage.length(), buflen, buffer); } @@ -1082,7 +1082,7 @@ bool KMSendSMTP::doSend( const TQString & sender, const TQStringList & to, const if (ti->auth) { - TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.tqfind( ti->name ); + TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.find( ti->name ); TQString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):TQString(); if ( ti->passwd().isEmpty() ) diff --git a/kmail/kmservertest.cpp b/kmail/kmservertest.cpp index 67dc0f2d5..c7f96ce36 100644 --- a/kmail/kmservertest.cpp +++ b/kmail/kmservertest.cpp @@ -112,17 +112,17 @@ void KMServerTest::slotData(KIO::Job *, const TQString &data) void KMServerTest::slotMetaData( const KIO::MetaData & md ) { - KIO::MetaData::const_iterator it = md.tqfind( "PLAIN AUTH METHODS" ); + KIO::MetaData::const_iterator it = md.find( "PLAIN AUTH METHODS" ); if ( it != md.end() ) { mAuthNone = it.data(); kdDebug(5006) << "mAuthNone: " << mAuthNone << endl; } - it = md.tqfind( "TLS AUTH METHODS" ); + it = md.find( "TLS AUTH METHODS" ); if ( it != md.end() ) { mAuthTLS = it.data(); kdDebug(5006) << "mAuthTLS: " << mAuthTLS << endl; } - it = md.tqfind( "SSL AUTH METHODS" ); + it = md.find( "SSL AUTH METHODS" ); if ( it != md.end() ) { mAuthSSL = it.data(); kdDebug(5006) << "mAuthSSL: " << mAuthSSL << endl; @@ -142,7 +142,7 @@ void KMServerTest::slotSlaveResult(KIO::Slave *aSlave, int error, if (aSlave != mSlave) return; if ( mSSL && error == 0 ) { // add a dummy entry to the list of SSL capabilities so that the receiver - // of the capabilities signal can use mListSSL.isEmpty() in order to tqfind + // of the capabilities signal can use mListSSL.isEmpty() in order to find // out whether SSL is supported mListSSL.append("SSL"); } diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index fd3d7bd7e..4d82e9e19 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -173,7 +173,7 @@ void lockOrDie() { path_buffer[length] = '\0'; const TQString path = TQFile::decodeName(path_buffer); kdDebug() << k_funcinfo << path << endl; - const int pos = path.tqfindRev('/'); + const int pos = path.findRev('/'); const TQString fileName = path.mid(pos+1); kdDebug() << "Found process " << oldPid << " running. It's: " << fileName << endl; first_instance = fileName != "kmail" && fileName != "kontact"; diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp index 9742d6278..1c6bc0363 100644 --- a/kmail/kmsystemtray.cpp +++ b/kmail/kmsystemtray.cpp @@ -483,7 +483,7 @@ void KMSystemTray::updateNewMessages() int unread = fldr->countUnread(); TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it = - mFoldersWithUnread.tqfind(fldr); + mFoldersWithUnread.find(fldr); bool unmapped = (it == mFoldersWithUnread.end()); /** If the folder is not mapped yet, increment count by numUnread diff --git a/kmail/kmtransport.cpp b/kmail/kmtransport.cpp index 46ed0efc9..e5afc1c6d 100644 --- a/kmail/kmtransport.cpp +++ b/kmail/kmtransport.cpp @@ -522,7 +522,7 @@ void KMTransportDialog::makeSmtpPage() mSmtp.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup ); mSmtp.authNTLM = new TQRadioButton( i18n("&NTLM"), mSmtp.authGroup ); mSmtp.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mSmtp.authGroup ); - if ( KProtocolInfo::capabilities("smtp").tqcontains("SASL") == 0 ) { + if ( KProtocolInfo::capabilities("smtp").contains("SASL") == 0 ) { mSmtp.authNTLM->hide(); mSmtp.authGSSAPI->hide(); } @@ -735,7 +735,7 @@ void KMTransportDialog::checkHighest(TQButtonGroup *btnGroup) { for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind(i); + TQButton * btn = btnGroup->find(i); if (btn && btn->isEnabled()) { btn->animateClick(); @@ -756,7 +756,7 @@ void KMTransportDialog::slotSmtpCapabilities( const TQStringList & capaNormal, << authNone << ", " << authSSL << ", " << authTLS << " )" << endl; mSmtp.encryptionNone->setEnabled( !capaNormal.isEmpty() ); mSmtp.encryptionSSL->setEnabled( !capaSSL.isEmpty() ); - mSmtp.encryptionTLS->setEnabled( capaNormal.tqfindIndex("STARTTLS") != -1 ); + mSmtp.encryptionTLS->setEnabled( capaNormal.findIndex("STARTTLS") != -1 ); if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) mAuthNone = authMethodsFromStringList( capaNormal ); diff --git a/kmail/listjob.cpp b/kmail/listjob.cpp index e126f3e56..e6726a9a5 100644 --- a/kmail/listjob.cpp +++ b/kmail/listjob.cpp @@ -230,7 +230,7 @@ void ListJob::slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds ) // Some servers send _lots_ of duplicates // This check is too slow for huge lists if ( mSubfolderPaths.count() > 100 || - mSubfolderPaths.tqfindIndex(url.path()) == -1 ) + mSubfolderPaths.findIndex(url.path()) == -1 ) { mSubfolderNames.append( name ); mSubfolderPaths.append( url.path() ); diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp index 3c9efd147..0b646e94a 100644 --- a/kmail/mailinglist-magic.cpp +++ b/kmail/mailinglist-magic.cpp @@ -31,10 +31,10 @@ static TQString check_sender(const KMMessage *message, { header_name = "Sender"; header_value = header; - header = header.mid( 6, header.tqfind( '@' ) - 6 ); + header = header.mid( 6, header.find( '@' ) - 6 ); } else { - int index = header.tqfind( "-owner@ " ); + int index = header.find( "-owner@ " ); if ( index == -1 ) return TQString(); @@ -52,12 +52,12 @@ static TQString check_x_beenthere(const KMMessage *message, TQString &header_value ) { TQString header = message->headerField( "X-BeenThere" ); - if ( header.isNull() || header.tqfind( '@' ) == -1 ) + if ( header.isNull() || header.find( '@' ) == -1 ) return TQString(); header_name = "X-BeenThere"; header_value = header; - header.truncate( header.tqfind( '@' ) ); + header.truncate( header.find( '@' ) ); return header; } @@ -68,13 +68,13 @@ static TQString check_delivered_to(const KMMessage *message, { TQString header = message->headerField( "Delivered-To" ); if ( header.isNull() || header.left(13 ) != "mailing list" - || header.tqfind( '@' ) == -1 ) + || header.find( '@' ) == -1 ) return TQString(); header_name = "Delivered-To"; header_value = header; - return header.mid( 13, header.tqfind( '@' ) - 13 ); + return header.mid( 13, header.find( '@' ) - 13 ); } /* X-Mailing-List: <?([^@]+) */ @@ -86,15 +86,15 @@ static TQString check_x_mailing_list(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if ( header.tqfind( '@' ) < 1 ) + if ( header.find( '@' ) < 1 ) return TQString(); header_name = "X-Mailing-List"; header_value = header; if ( header[0] == '<' ) - header = header.mid(1, header.tqfind( '@' ) - 1); + header = header.mid(1, header.find( '@' ) - 1); else - header.truncate( header.tqfind( '@' ) ); + header.truncate( header.find( '@' ) ); return header; } @@ -108,11 +108,11 @@ static TQString check_list_id(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - lAnglePos = header.tqfind( '<' ); + lAnglePos = header.find( '<' ); if ( lAnglePos < 0 ) return TQString(); - firstDotPos = header.tqfind( '.', lAnglePos ); + firstDotPos = header.find( '.', lAnglePos ); if ( firstDotPos < 0 ) return TQString(); @@ -132,14 +132,14 @@ static TQString check_list_post(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - int lAnglePos = header.tqfind( "<mailto:" ); + int lAnglePos = header.find( "<mailto:" ); if ( lAnglePos < 0 ) return TQString(); header_name = "List-Post"; header_value = header; header = header.mid( lAnglePos + 8, header.length()); - header.truncate( header.tqfind('@') ); + header.truncate( header.find('@') ); return header; } @@ -152,12 +152,12 @@ static TQString check_mailing_list(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if (header.left( 5 ) != "list " || header.tqfind( '@' ) < 5 ) + if (header.left( 5 ) != "list " || header.find( '@' ) < 5 ) return TQString(); header_name = "Mailing-List"; header_value = header; - header = header.mid(5, header.tqfind( '@' ) - 5); + header = header.mid(5, header.find( '@' ) - 5); return header; } @@ -170,12 +170,12 @@ static TQString check_x_loop(const KMMessage *message, if ( header.isEmpty() ) return TQString(); - if (header.tqfind( '@' ) < 2 ) + if (header.find( '@' ) < 2 ) return TQString(); header_name = "X-Loop"; header_value = header; - header.truncate(header.tqfind( '@' )); + header.truncate(header.find( '@' )); return header; } @@ -189,7 +189,7 @@ static TQString check_x_ml_name(const KMMessage *message, header_name = "X-ML-Name"; header_value = header; - header.truncate(header.tqfind( '@' )); + header.truncate(header.find( '@' )); return header; } @@ -218,8 +218,8 @@ headerToAddress( const TQString& header ) if ( header.isEmpty() ) return addr; - while ( (start = header.tqfind( "<", start )) != -1 ) { - if ( (end = header.tqfind( ">", ++start ) ) == -1 ) { + while ( (start = header.find( "<", start )) != -1 ) { + if ( (end = header.find( ">", ++start ) ) == -1 ) { kdDebug(5006)<<k_funcinfo<<"Serious mailing list header parsing error !"<<endl; return addr; } diff --git a/kmail/mailinglistpropertiesdialog.cpp b/kmail/mailinglistpropertiesdialog.cpp index 2fb6203db..7caa9817a 100644 --- a/kmail/mailinglistpropertiesdialog.cpp +++ b/kmail/mailinglistpropertiesdialog.cpp @@ -257,7 +257,7 @@ void MailingListFolderPropertiesDialog::fillMLFromWidgets() for ( TQStringList::ConstIterator it = oldList.begin(); it != oldList.end(); ++it ) { if ( !(*it).startsWith("http:") && !(*it).startsWith("https:") && - !(*it).startsWith("mailto:") && ( (*it).tqfind('@') != -1 ) ) { + !(*it).startsWith("mailto:") && ( (*it).find('@') != -1 ) ) { changed = true; newList << "mailto:" + *it; } diff --git a/kmail/mboxjob.cpp b/kmail/mboxjob.cpp index 93f94d43f..0d46fe8b3 100644 --- a/kmail/mboxjob.cpp +++ b/kmail/mboxjob.cpp @@ -89,7 +89,7 @@ MboxJob::startJob() kdDebug(5006)<<msg<<endl; kdDebug(5006)<<this<<endl; kdDebug(5006)<<"Done"<<endl; - //KMMessage* msg = mParent->getMsg( mParent->tqfind( mMsgList.first() ) ); + //KMMessage* msg = mParent->getMsg( mParent->find( mMsgList.first() ) ); msg->setComplete( true ); emit messageRetrieved( msg ); } diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp index cf3357fa3..c69aa525b 100644 --- a/kmail/messagecomposer.cpp +++ b/kmail/messagecomposer.cpp @@ -1527,7 +1527,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerDwPart->Assemble(); TQByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() ); if ( mIsRichText ) { // and add our mp/a boundary - int boundPos = tmpbody.tqfind( '\n' ); + int boundPos = tmpbody.find( '\n' ); if( -1 < boundPos ) { TQCString bStr( ";\n boundary=\"" ); bStr += mSaveBoundary.c_str(); @@ -1590,7 +1590,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, // manually add a boundary definition to the Content-Type header if( !mMultipartMixedBoundary.isEmpty() ) { - int boundPos = mEncodedBody.tqfind( '\n' ); + int boundPos = mEncodedBody.find( '\n' ); if( -1 < boundPos ) { // insert new "boundary" parameter TQCString bStr( ";\n boundary=\"" ); @@ -1928,7 +1928,7 @@ bool MessageComposer::processStructuringInfo( const TQString bugURL, const TQCString boundaryCStr = KMime::multiPartBoundary(); // add "boundary" parameter if ( makeMultiMime( format, signing ) ) - mainHeader.tqreplace( "%boundary", boundaryCStr ); + mainHeader.replace( "%boundary", boundaryCStr ); if ( toplevelCT ) { if ( const char * str = toplevelContentDisposition( format, signing ) ) { diff --git a/kmail/messagecopyhelper.cpp b/kmail/messagecopyhelper.cpp index 84618ea87..916920168 100644 --- a/kmail/messagecopyhelper.cpp +++ b/kmail/messagecopyhelper.cpp @@ -43,7 +43,7 @@ MessageCopyHelper::MessageCopyHelper( const TQValueList< TQ_UINT32 > & msgs, continue; if ( f == dest ) continue; // already there - if ( !mOpenFolders.tqcontains( f ) ) {// not yet opened + if ( !mOpenFolders.contains( f ) ) {// not yet opened f->open( "messagecopyhelper" ); mOpenFolders.insert( f, 0 ); } diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp index 91261540f..b8b37f915 100644 --- a/kmail/messageproperty.cpp +++ b/kmail/messageproperty.cpp @@ -42,14 +42,14 @@ TQMap<const KMMsgBase*, long > MessageProperty::sSerialCache; bool MessageProperty::filtering( TQ_UINT32 serNum ) { - return sFolders.tqcontains( serNum ); + return sFolders.contains( serNum ); } void MessageProperty::setFiltering( TQ_UINT32 serNum, bool filter ) { assert(!filtering(serNum) || !filter); if (filter && !filtering(serNum)) - sFolders.tqreplace(serNum, TQGuardedPtr<KMFolder>(0) ); + sFolders.replace(serNum, TQGuardedPtr<KMFolder>(0) ); else if (!filter) sFolders.remove(serNum); } @@ -66,7 +66,7 @@ void MessageProperty::setFiltering( const KMMsgBase *msgBase, bool filter ) KMFolder* MessageProperty::filterFolder( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, TQGuardedPtr<KMFolder> >::const_iterator it = sFolders.tqfind( serNum ); + TQMap<TQ_UINT32, TQGuardedPtr<KMFolder> >::const_iterator it = sFolders.find( serNum ); return it == sFolders.constEnd() ? 0 : (*it).operator->(); } @@ -87,7 +87,7 @@ void MessageProperty::setFilterFolder( const KMMsgBase *msgBase, KMFolder* folde ActionScheduler* MessageProperty::filterHandler( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, TQGuardedPtr<ActionScheduler> >::const_iterator it = sHandlers.tqfind( serNum ); + TQMap<TQ_UINT32, TQGuardedPtr<ActionScheduler> >::const_iterator it = sHandlers.find( serNum ); return it == sHandlers.constEnd() ? 0 : (*it).operator->(); } @@ -111,14 +111,14 @@ void MessageProperty::setFilterHandler( const KMMsgBase *msgBase, ActionSchedule bool MessageProperty::transferInProgress( TQ_UINT32 serNum ) { - TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.tqfind( serNum ); + TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.find( serNum ); return it == sTransfers.constEnd() ? false : *it; } void MessageProperty::setTransferInProgress( TQ_UINT32 serNum, bool transfer, bool force ) { int transferInProgress = 0; - TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.tqfind( serNum ); + TQMap<TQ_UINT32, int >::const_iterator it = sTransfers.find( serNum ); if (it != sTransfers.constEnd()) transferInProgress = *it; if ( force && !transfer ) @@ -145,7 +145,7 @@ void MessageProperty::setTransferInProgress( const KMMsgBase *msgBase, bool tran TQ_UINT32 MessageProperty::serialCache( const KMMsgBase *msgBase ) { - TQMap<const KMMsgBase*, long >::const_iterator it = sSerialCache.tqfind( msgBase ); + TQMap<const KMMsgBase*, long >::const_iterator it = sSerialCache.find( msgBase ); return it == sSerialCache.constEnd() ? 0 : *it; } diff --git a/kmail/mh2kmailr b/kmail/mh2kmailr index df76fec1e..d88905aae 100755 --- a/kmail/mh2kmailr +++ b/kmail/mh2kmailr @@ -14,13 +14,13 @@ fi MH_DIR=$1 -for d in `/usr/bin/tqfind $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for d in `/usr/bin/find $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do FOLDER=${d}.mbx # remove old kmail folder if any rm -f $FOLDER -for f in `/usr/bin/tqfind $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for f in `/usr/bin/find $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do echo "From ???@??? 00:00:00 1997 +0000" >> $FOLDER cat $f >> $FOLDER done diff --git a/kmail/networkaccount.cpp b/kmail/networkaccount.cpp index b400b52a6..fa719c534 100644 --- a/kmail/networkaccount.cpp +++ b/kmail/networkaccount.cpp @@ -321,7 +321,7 @@ namespace KMail { if ( host().isEmpty() ) return; if ( checking ) { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() ) + if ( s_serverConnections.find( host() ) != s_serverConnections.end() ) s_serverConnections[host()] += 1; else s_serverConnections[host()] = 1; @@ -329,7 +329,7 @@ namespace KMail { << host() << " now is " << s_serverConnections[host()] << endl; } else { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() && + if ( s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] > 0 ) { s_serverConnections[host()] -= 1; kdDebug(5006) << "connections to server " << host() @@ -344,12 +344,12 @@ namespace KMail { kdDebug(5006) << "for host " << host() << " current connections=" - << (s_serverConnections.tqfind(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) + << (s_serverConnections.find(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) << " and limit is " << GlobalSettings::self()->maxConnectionsPerHost() << endl; bool connectionLimitForHostReached = !host().isEmpty() && GlobalSettings::self()->maxConnectionsPerHost() > 0 - && s_serverConnections.tqfind( host() ) != s_serverConnections.end() + && s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] >= GlobalSettings::self()->maxConnectionsPerHost(); kdDebug(5006) << "connection limit reached: " << connectionLimitForHostReached << endl; diff --git a/kmail/newfolderdialog.cpp b/kmail/newfolderdialog.cpp index d1e7de22f..11a52043b 100644 --- a/kmail/newfolderdialog.cpp +++ b/kmail/newfolderdialog.cpp @@ -121,7 +121,7 @@ NewFolderDialog::NewFolderDialog( TQWidget* tqparent, KMFolder *folder ) mContentsHBox = new TQHBoxLayout( 0, 0, 6, "mContentsHBox"); mContentsLabel = new TQLabel( privateLayoutWidget, "mContentsLabel" ); - mContentsLabel->setText( i18n( "Folder &tqcontains:" ) ); + mContentsLabel->setText( i18n( "Folder &contains:" ) ); mContentsHBox->addWidget( mContentsLabel ); mContentsComboBox = new TQComboBox( false, privateLayoutWidget, "mContentsComboBox" ); diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 0b79d98c0..db27f7f59 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -804,9 +804,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); #ifdef MARCS_DEBUG TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() ); @@ -916,9 +916,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // ### while pinentry-qt appears) TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); if ( !cipherIsBinary ) { decryptedData = cipherStr; } @@ -939,12 +939,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, bool ObjectTreeParser::containsExternalReferences( const TQCString & str ) { TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); - int httpPos = str.tqfind( httpRegExp, 0 ); + int httpPos = str.find( httpRegExp, 0 ); while ( httpPos >= 0 ) { // look backwards for "href" if ( httpPos > 5 ) { - int hrefPos = str.tqfindRev( "href", httpPos - 5, true ); + int hrefPos = str.findRev( "href", httpPos - 5, true ); // if no 'href' is found or the distance between 'href' and '"http[s]:' // is larger than 7 (7 is the distance in 'href = "http[s]:') then // we assume that we have found an external reference @@ -952,7 +952,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, return true; } // find next occurrence of "http: or "https: - httpPos = str.tqfind( httpRegExp, httpPos + 6 ); + httpPos = str.find( httpRegExp, httpPos + 6 ); } return false; } @@ -979,12 +979,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // We must fo this, or else we will see only 1st inlined html // attachment. It is IMHO enough to search only for </BODY> and // put \0 there. - int i = cstr.tqfindRev("</body>", -1, false); //case insensitive + int i = cstr.findRev("</body>", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); else // just in case - search for </html> { - i = cstr.tqfindRev("</html>", -1, false); //case insensitive + i = cstr.findRev("</html>", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); } // ---Sven's strip </BODY> and </HTML> from end of attachment end- @@ -1031,7 +1031,7 @@ static bool isMailmanMessage( partNode * curNode ) { return true; if ( headers.HasField("X-Mailer") && 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() ) - .tqfind("MAILMAN", 0, false) ) + .find("MAILMAN", 0, false) ) return true; return false; } @@ -1047,21 +1047,21 @@ namespace KMail { const TQCString delimZ2("--__--__--\n\n_____________"); const TQCString delimZ1("--__--__--\r\n\r\n_____________"); TQCString partStr, digestHeaderStr; - int thisDelim = cstr.tqfind(delim1.data(), 0, false); + int thisDelim = cstr.find(delim1.data(), 0, false); if ( thisDelim == -1 ) - thisDelim = cstr.tqfind(delim2.data(), 0, false); + thisDelim = cstr.find(delim2.data(), 0, false); if ( thisDelim == -1 ) { kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl; return false; } - int nextDelim = cstr.tqfind(delim1.data(), thisDelim+1, false); + int nextDelim = cstr.find(delim1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim+1, false); + nextDelim = cstr.find(delim2.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim+1, false); if ( nextDelim < 0) return false; @@ -1081,15 +1081,15 @@ namespace KMail { curNode->setType( DwMime::kTypeMultipart ); curNode->setSubType( DwMime::kSubtypeDigest ); while( -1 < nextDelim ){ - int thisEoL = cstr.tqfind("\nMessage:", thisDelim, false); + int thisEoL = cstr.find("\nMessage:", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else{ - thisEoL = cstr.tqfind("\n_____________", thisDelim, false); + thisEoL = cstr.find("\n_____________", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else @@ -1101,10 +1101,10 @@ namespace KMail { partStr += cstr.mid( thisDelim, nextDelim-thisDelim ); TQCString subject("embedded message"); TQCString subSearch("\nSubject:"); - int subPos = partStr.tqfind(subSearch.data(), 0, false); + int subPos = partStr.find(subSearch.data(), 0, false); if ( -1 < subPos ){ subject = partStr.mid(subPos+subSearch.length()); - thisEoL = subject.tqfind('\n'); + thisEoL = subject.find('\n'); if ( -1 < thisEoL ) subject.truncate( thisEoL ); } @@ -1114,21 +1114,21 @@ namespace KMail { subject, true ); //mReader->queueHtml("<br><hr><br>"); thisDelim = nextDelim+1; - nextDelim = cstr.tqfind(delim1.data(), thisDelim, false); + nextDelim = cstr.find(delim1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim, false); + nextDelim = cstr.find(delim2.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim, false); } // reset curent node's Content-Type curNode->setType( DwMime::kTypeText ); curNode->setSubType( DwMime::kSubtypePlain ); - int thisEoL = cstr.tqfind("_____________", thisDelim); + int thisEoL = cstr.find("_____________", thisDelim); if ( -1 < thisEoL ){ thisDelim = thisEoL; - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } @@ -1720,7 +1720,7 @@ namespace KMail { bool isSigned = smimeType == "signed-data"; bool isEncrypted = smimeType == "enveloped-data"; - // Analyze "signTestNode" node to tqfind/verify a signature. + // Analyze "signTestNode" node to find/verify a signature. // If zero this verification was successfully done after // decrypting via recursion by insertAndParseNewChildNode(). partNode* signTestNode = isEncrypted ? 0 : node; @@ -2252,7 +2252,7 @@ TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protoco } /* // add i18n support for 3rd party plug-ins here: - else if (0 <= cryptPlug->libName().tqfind( "yetanotherpluginname", 0, false )) { + else if (0 <= cryptPlug->libName().find( "yetanotherpluginname", 0, false )) { } */ @@ -2982,7 +2982,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) TQString line; /* search next occurrence of '\n' */ - pos = s.tqfind('\n', beg, FALSE); + pos = s.find('\n', beg, FALSE); if (pos == (unsigned int)(-1)) pos = length; @@ -3083,7 +3083,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) { // don't write empty <div ...></div> blocks (they have zero height) // ignore ^M DOS linebreaks - if( !line.tqreplace('\015', "").isEmpty() ) + if( !line.replace('\015', "").isEmpty() ) { htmlStr +=TQString( "<div dir=\"%1\">" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); diff --git a/kmail/objecttreeparser.h b/kmail/objecttreeparser.h index 2325b2423..b864ea618 100644 --- a/kmail/objecttreeparser.h +++ b/kmail/objecttreeparser.h @@ -253,7 +253,7 @@ namespace KMail { bool processToltecMail( partNode * node ); /** Checks whether @p str contains external references. To be precise, - we only check whether @p str tqcontains 'xxx="http[s]:' where xxx is + we only check whether @p str contains 'xxx="http[s]:' where xxx is not href. Obfuscated external references are ignored on purpose. */ static bool containsExternalReferences( const TQCString & str ); diff --git a/kmail/partNode.cpp b/kmail/partNode.cpp index 352698252..e4cb59221 100644 --- a/kmail/partNode.cpp +++ b/kmail/partNode.cpp @@ -516,7 +516,7 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem, cntSize = size; } // remove linebreak+whitespace from folded Content-Description - cntDesc.tqreplace( TQRegExp("\\n\\s*"), " " ); + cntDesc.replace( TQRegExp("\\n\\s*"), " " ); if( parentItem ) mMimePartTreeItem = new KMMimePartTreeItem( parentItem, diff --git a/kmail/popaccount.cpp b/kmail/popaccount.cpp index 932b503e2..a37bc6d58 100644 --- a/kmail/popaccount.cpp +++ b/kmail/popaccount.cpp @@ -514,13 +514,13 @@ void PopAccount::slotJobFinished() { mUidForIdMap[hids.key()], Later));//TODO //set Action if already known - if( mHeaderDeleteUids.tqcontains( headersOnServer.current()->uid() ) ) { + if( mHeaderDeleteUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Delete); } - else if( mHeaderDownUids.tqcontains( headersOnServer.current()->uid() ) ) { + else if( mHeaderDownUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Down); } - else if( mHeaderLaterUids.tqcontains( headersOnServer.current()->uid() ) ) { + else if( mHeaderLaterUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Later); } } @@ -625,7 +625,7 @@ void PopAccount::slotJobFinished() { headersOnServer.current()->action() == Later) { //remove entries from the lists when the mails should not be downloaded //(deleted or downloaded later) - if ( mMsgsPendingDownload.tqcontains( headersOnServer.current()->id() ) ) { + if ( mMsgsPendingDownload.contains( headersOnServer.current()->id() ) ) { mMsgsPendingDownload.remove( headersOnServer.current()->id() ); } if (headersOnServer.current()->action() == Delete) { @@ -930,11 +930,11 @@ void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) // otherwise stage is List Or Uidl TQString qdata = data; qdata = qdata.simplifyWhiteSpace(); // Workaround for Maillennium POP3/UNIBOX - int spc = qdata.tqfind( ' ' ); + int spc = qdata.find( ' ' ); if ( stage == List ) { if ( spc > 0 ) { TQString length = qdata.mid(spc+1); - if (length.tqfind(' ') != -1) length.truncate(length.tqfind(' ')); + if (length.find(' ') != -1) length.truncate(length.find(' ')); int len = length.toInt(); numBytes += len; TQString id = qdata.left(spc); @@ -989,8 +989,8 @@ void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) int *size = new int; //malloc(size_of(int)); *size = mMsgsPendingDownload[id]; mSizeOfNextSeenMsgsDict.insert( uid, size ); - if ( mUidsOfSeenMsgsDict.tqfind( uid ) != 0 ) { - if ( mMsgsPendingDownload.tqcontains( id ) ) { + if ( mUidsOfSeenMsgsDict.find( uid ) != 0 ) { + if ( mMsgsPendingDownload.contains( id ) ) { mMsgsPendingDownload.remove( id ); } else diff --git a/kmail/recipientseditor.cpp b/kmail/recipientseditor.cpp index 387331cc6..2bdfe3998 100644 --- a/kmail/recipientseditor.cpp +++ b/kmail/recipientseditor.cpp @@ -456,7 +456,7 @@ void RecipientsView::slotReturnPressed( RecipientLine *line ) void RecipientsView::slotDownPressed( RecipientLine *line ) { - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); if ( pos >= (int)mLines.count() - 1 ) { emit focusDown(); } else if ( pos >= 0 ) { @@ -466,7 +466,7 @@ void RecipientsView::slotDownPressed( RecipientLine *line ) void RecipientsView::slotUpPressed( RecipientLine *line ) { - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); if ( pos > 0 ) { activateLine( mLines.at( pos - 1 ) ); } else { @@ -492,7 +492,7 @@ void RecipientsView::slotDeleteLine() return; RecipientLine *line = mCurDelLine; - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); int newPos; if ( pos == 0 ) newPos = pos + 1; diff --git a/kmail/recipientspicker.cpp b/kmail/recipientspicker.cpp index 0bbacbeae..11b2cec6f 100644 --- a/kmail/recipientspicker.cpp +++ b/kmail/recipientspicker.cpp @@ -294,13 +294,13 @@ RecipientItem::List RecipientsCollection::items() const bool RecipientsCollection::hasEquivalentItem( RecipientItem *item ) const { - return mKeyMap.tqfind( item->key() ) != mKeyMap.end(); + return mKeyMap.find( item->key() ) != mKeyMap.end(); } RecipientItem * RecipientsCollection::getEquivalentItem( RecipientItem *item) const { TQMap<TQString, RecipientItem *>::ConstIterator it; - it = mKeyMap.tqfind( item->key() ); + it = mKeyMap.find( item->key() ); if ( it == mKeyMap.end() ) return 0; return (*it); @@ -505,7 +505,7 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) item->setAddressee( *it, *it3 ); TQMap<KABC::Resource *,RecipientsCollection *>::ConstIterator collIt; - collIt = collectionMap.tqfind( it->resource() ); + collIt = collectionMap.find( it->resource() ); if ( collIt != collectionMap.end() ) { (*collIt)->addItem( item ); } @@ -514,7 +514,7 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) TQStringList::ConstIterator catIt; for( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { TQMap<TQString, RecipientsCollection *>::ConstIterator catMapIt; - catMapIt = categoryMap.tqfind( *catIt ); + catMapIt = categoryMap.find( *catIt ); RecipientsCollection *collection; if ( catMapIt == categoryMap.end() ) { collection = new RecipientsCollection( *catIt ); diff --git a/kmail/renamejob.cpp b/kmail/renamejob.cpp index d4aa76f59..8f69e6f62 100644 --- a/kmail/renamejob.cpp +++ b/kmail/renamejob.cpp @@ -138,7 +138,7 @@ void RenameJob::execute() ImapAccountBase* account = static_cast<KMFolderImap*>(mStorage)->account(); // first rename it on the server mNewImapPath = mOldImapPath; - mNewImapPath = mNewImapPath.tqreplace( mOldName, mNewName ); + mNewImapPath = mNewImapPath.replace( mOldName, mNewName ); KURL src( account->getUrl() ); src.setPath( mOldImapPath ); KURL dst( account->getUrl() ); diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp index 18a848149..42ef1ca4c 100644 --- a/kmail/rulewidgethandlermanager.cpp +++ b/kmail/rulewidgethandlermanager.cpp @@ -403,7 +403,7 @@ namespace { const KMSearchRule::Function id; const char *displayName; } TextFunctions[] = { - { KMSearchRule::FuncContains, I18N_NOOP( "tqcontains" ) }, + { KMSearchRule::FuncContains, I18N_NOOP( "contains" ) }, { KMSearchRule::FuncContainsNot, I18N_NOOP( "does not contain" ) }, { KMSearchRule::FuncEquals, I18N_NOOP( "equals" ) }, { KMSearchRule::FuncNotEqual, I18N_NOOP( "does not equal" ) }, @@ -738,7 +738,7 @@ namespace { const KMSearchRule::Function id; const char *displayName; } MessageFunctions[] = { - { KMSearchRule::FuncContains, I18N_NOOP( "tqcontains" ) }, + { KMSearchRule::FuncContains, I18N_NOOP( "contains" ) }, { KMSearchRule::FuncContainsNot, I18N_NOOP( "does not contain" ) }, { KMSearchRule::FuncRegExp, I18N_NOOP( "matches regular expr." ) }, { KMSearchRule::FuncNotRegExp, I18N_NOOP( "does not match reg. expr." ) }, diff --git a/kmail/scalix.cpp b/kmail/scalix.cpp index 5db8a168d..4910119d0 100644 --- a/kmail/scalix.cpp +++ b/kmail/scalix.cpp @@ -60,7 +60,7 @@ KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir, typeMap.insert( KMail::ContentsTypeNote, "IPF.StickyNote" ); typeMap.insert( KMail::ContentsTypeTask, "IPF.Task" ); - if ( !typeMap.tqcontains( contentsType ) ) + if ( !typeMap.contains( contentsType ) ) return 0; for ( uint i = 0; i < attributes.count(); ++i ) { diff --git a/kmail/searchjob.cpp b/kmail/searchjob.cpp index a9eb35365..1a979d4f9 100644 --- a/kmail/searchjob.cpp +++ b/kmail/searchjob.cpp @@ -305,7 +305,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) // imap and local search have to match if ( mLocalSearchPattern->matches( msg ) && ( mImapSearchHits.isEmpty() || - mImapSearchHits.tqfind( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { + mImapSearchHits.find( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { TQ_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; @@ -313,7 +313,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) } else if ( mLocalSearchPattern->op() == KMSearchPattern::OpOr ) { // imap or local search have to match if ( mLocalSearchPattern->matches( msg ) || - mImapSearchHits.tqfind( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) { + mImapSearchHits.find( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) { TQ_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp index 24d08a069..6250d761d 100644 --- a/kmail/searchwindow.cpp +++ b/kmail/searchwindow.cpp @@ -110,7 +110,7 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KMFolder *curFolder, bool modal): KDialogBase(0, name, modal, i18n("Find Messages"), User1 | User2 | Close, User1, false, - KGuiItem( i18n("&Search"), "tqfind" ), + KGuiItem( i18n("&Search"), "find" ), KStdGuiItem::stop()), mStopped(false), mCloseRequested(false), @@ -494,7 +494,7 @@ void SearchWindow::slotSearch() TQString fullName = baseName; int count = 0; KMFolder *folder; - while ((folder = mgr->tqfind(fullName))) { + while ((folder = mgr->find(fullName))) { if (folder->storage()->inherits("KMFolderSearch")) break; fullName = TQString("%1 %2").tqarg(baseName).tqarg(++count); @@ -563,7 +563,7 @@ void SearchWindow::slotAddMsg(int idx) KMMessage *msg = mFolder->getMsg(idx); TQString from, fName; KMFolder *pFolder = msg->tqparent(); - if (!mFolders.tqcontains(pFolder)) { + if (!mFolders.contains(pFolder)) { mFolders.append(pFolder); pFolder->open("searchwindow"); } @@ -648,7 +648,7 @@ void SearchWindow::renameSearchFolder() int i = 1; TQString name = mSearchFolderEdt->text(); while (i < 100) { - if (!kmkernel->searchFolderMgr()->tqfind( name )) { + if (!kmkernel->searchFolderMgr()->find( name )) { mFolder->rename( name ); kmkernel->searchFolderMgr()->contentsChanged(); break; diff --git a/kmail/simplefoldertree.h b/kmail/simplefoldertree.h index 92545c665..00632fbde 100644 --- a/kmail/simplefoldertree.h +++ b/kmail/simplefoldertree.h @@ -50,7 +50,7 @@ static int recurseFilter( TQListViewItem * item, const TQString& filter, int col } if ( filter.length() == 0 || - item->text( column ).tqfind( filter, 0, false ) >= 0 ) { + item->text( column ).find( filter, 0, false ) >= 0 ) { item->setVisible( true ); ++enabled; } diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp index 442a36e15..4dba053ed 100644 --- a/kmail/snippetwidget.cpp +++ b/kmail/snippetwidget.cpp @@ -146,7 +146,7 @@ SnippetItem* SnippetWidget::makeItem( SnippetItem* tqparent, const TQString& nam { SnippetItem * item = new SnippetItem(tqparent, name, text); const TQString actionName = i18n("Snippet %1").tqarg(name); - const TQString normalizedName = TQString(actionName).tqreplace(" ", "_"); + const TQString normalizedName = TQString(actionName).replace(" ", "_"); if ( !mActionCollection->action(normalizedName.utf8().data() ) ) { KAction * action = new KAction( actionName, shortcut, item, TQT_SLOT( slotExecute() ), mActionCollection, @@ -578,9 +578,9 @@ TQString SnippetWidget::parseText(TQString text, TQString del) TQRect rMulti = _SnippetConfig.getMultiRect(); do { - iFound = text.tqfind(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this TQRegExp + iFound = text.find(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this TQRegExp if (iFound >= 0) { - iEnd = text.tqfind(del, iFound+1)+1; + iEnd = text.find(del, iFound+1)+1; strName = text.mid(iFound, iEnd-iFound); if ( strName != del+del ) { //if not doubel-delimiter @@ -601,7 +601,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) } if (iInMeth == 0) { //if input-method "single" is selected - str.tqreplace(strName, strNew); + str.replace(strName, strNew); } mapVar[strName] = strNew; @@ -616,7 +616,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) if (showMultiVarDialog( &mapVar, &_mapSaved, w, bh, oh )) { //generate and show the dialog TQMap<TQString, TQString>::Iterator it; for ( it = mapVar.begin(); it != mapVar.end(); ++it ) { //walk through the map and do the replacement - str.tqreplace(it.key(), it.data()); + str.replace(it.key(), it.data()); } } else { return ""; diff --git a/kmail/templateparser.cpp b/kmail/templateparser.cpp index 775d9a938..dab5665e0 100644 --- a/kmail/templateparser.cpp +++ b/kmail/templateparser.cpp @@ -126,7 +126,7 @@ TQString TemplateParser::getFName( const TQString &str ) // last resort -- return 'name' from 'name@domain' int sep_pos; TQString res; - if ( ( sep_pos = str.tqfind( '@' ) ) > 0 ) { + if ( ( sep_pos = str.find( '@' ) ) > 0 ) { int i; for ( i = (sep_pos - 1); i >= 0; --i ) { TQChar c = str[i]; @@ -136,7 +136,7 @@ TQString TemplateParser::getFName( const TQString &str ) break; } } - } else if ( ( sep_pos = str.tqfind(',') ) > 0 ) { + } else if ( ( sep_pos = str.find(',') ) > 0 ) { unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { @@ -169,7 +169,7 @@ TQString TemplateParser::getLName( const TQString &str ) // else format is 'First Last' int sep_pos; TQString res; - if ( ( sep_pos = str.tqfind(',') ) > 0 ) { + if ( ( sep_pos = str.find(',') ) > 0 ) { int i; for ( i = sep_pos; i >= 0; --i ) { TQChar c = str[i]; @@ -180,7 +180,7 @@ TQString TemplateParser::getLName( const TQString &str ) } } } else { - if ( ( sep_pos = str.tqfind( ' ' ) ) > 0 ) { + if ( ( sep_pos = str.find( ' ' ) ) > 0 ) { unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { @@ -963,7 +963,7 @@ void TemplateParser::addProcessedBodyToMessage( const TQString &body ) // Converting to a string here, since DwMediaType does not have a HasParameter() function TQString ctStr = ct.AsString().c_str(); - if ( !ctStr.lower().tqcontains( "name=" ) && !ctStr.lower().tqcontains( "filename=" ) ) { + if ( !ctStr.lower().contains( "name=" ) && !ctStr.lower().contains( "filename=" ) ) { DwParameter *nameParameter = new DwParameter; nameParameter->SetAttribute( "name" ); nameParameter->SetValue( Util::dwString( KMMsgBase::encodeRFC2231StringAutoDetectCharset( diff --git a/kmail/tests/messagedicttests.cpp b/kmail/tests/messagedicttests.cpp index e11bc3915..cdb24f6d8 100644 --- a/kmail/tests/messagedicttests.cpp +++ b/kmail/tests/messagedicttests.cpp @@ -42,7 +42,7 @@ void MessageDictTester::testKMDictInsert() p("Insert: "); KMDictItem *item = new KMDictItem(); m_dict->insert( 12345, item ); - KMDictItem *found = m_dict->tqfind( 12345 ); + KMDictItem *found = m_dict->find( 12345 ); CHECK( item, found); } @@ -50,7 +50,7 @@ void MessageDictTester::testKMDictRemove() { p("Remove: "); m_dict->remove( 12345 ); - KMDictItem *item = m_dict->tqfind( 12345 ); + KMDictItem *item = m_dict->find( 12345 ); CHECK( item, (KMDictItem*)0 ); } @@ -65,13 +65,13 @@ void MessageDictTester::testKMDictClear() void MessageDictTester::testKMDictReplace() { - p("Check tqreplace: "); + p("Check replace: "); m_dict->init( 31 ); KMDictItem *oldItem = new KMDictItem(); KMDictItem *newItem = new KMDictItem(); m_dict->insert( 12345, oldItem ); - m_dict->tqreplace( 12345, newItem ); - KMDictItem *found = m_dict->tqfind( 12345 ); + m_dict->replace( 12345, newItem ); + KMDictItem *found = m_dict->find( 12345 ); CHECK( found, newItem ); } diff --git a/kmail/tests/mimelibtests.cpp b/kmail/tests/mimelibtests.cpp index 34a4f4692..b152fdcf6 100644 --- a/kmail/tests/mimelibtests.cpp +++ b/kmail/tests/mimelibtests.cpp @@ -39,8 +39,8 @@ KUNITTEST_MODULE_REGISTER_TESTER( MimeLibTester ); static TQString makePrintable( const TQCString& str ) { TQString a = str; - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } #endif @@ -48,8 +48,8 @@ static TQString makePrintable( const TQCString& str ) static TQString makePrintable( const DwString& str ) { TQString a = KMail::Util::CString( str ); // ## we assume latin1 - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp index ec6c13543..d0b3135be 100644 --- a/kmail/tests/utiltests.cpp +++ b/kmail/tests/utiltests.cpp @@ -30,8 +30,8 @@ void UtilTester::tearDown() static TQString makePrintable( const TQCString& str ) { TQString a = str; - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } static TQString makePrintable( const TQByteArray& arr ) diff --git a/kmail/tips b/kmail/tips index 9aef85361..1defde798 100644 --- a/kmail/tips +++ b/kmail/tips @@ -18,7 +18,7 @@ subject and mailing lists with <em>Tools->Create Filter</em>?</p> added to the subject of some mailing lists by using the <em>rewrite header</em> filter action? Just use <pre>rewrite header "Subject" - tqreplace "\s*\[mailing list name\]\s*" + replace "\s*\[mailing list name\]\s*" with ""</pre> </p> </html> @@ -60,7 +60,7 @@ in the first edit field of a search rule?</p> <tip category="KMail|Filters"> <html> <p>...that you can filter out HTML only messages with the rule -<pre>"Content-type" tqcontains "text/html"?</pre> +<pre>"Content-type" contains "text/html"?</pre> </p> </html> </tip> diff --git a/kmail/transportmanager.cpp b/kmail/transportmanager.cpp index bde290905..e80d1cb27 100644 --- a/kmail/transportmanager.cpp +++ b/kmail/transportmanager.cpp @@ -60,7 +60,7 @@ namespace KMail { do { newId = kapp->random(); - } while ( usedIds.tqfind(newId) != usedIds.end() ); + } while ( usedIds.find(newId) != usedIds.end() ); return newId; } diff --git a/kmail/urlhandlermanager.cpp b/kmail/urlhandlermanager.cpp index 0ef6bfd24..7b88c0291 100644 --- a/kmail/urlhandlermanager.cpp +++ b/kmail/urlhandlermanager.cpp @@ -732,7 +732,7 @@ namespace { Q_UNUSED( window ); Q_UNUSED( url ); const TQString kmailImagePath = locate( "data", "kmail/pics/" ); - if ( imagePath.tqcontains( kmailImagePath ) ) { + if ( imagePath.contains( kmailImagePath ) ) { // Do nothing, don't start a drag return true; } @@ -745,7 +745,7 @@ namespace { Q_UNUSED( window ); Q_UNUSED( url ); const TQString kmailImagePath = locate( "data", "kmail/pics/" ); - return imagePath.tqcontains( kmailImagePath ); + return imagePath.contains( kmailImagePath ); } } diff --git a/kmail/vacation.cpp b/kmail/vacation.cpp index d3440a975..cee3a3cb1 100644 --- a/kmail/vacation.cpp +++ b/kmail/vacation.cpp @@ -212,7 +212,7 @@ namespace { static const GenericInformationExtractor::StateNode spamNodes[] = { { 0, GIE::CommandStart, "if", 1, 0, 0 }, // 0 { 0, GIE::TestStart, "header", 2, 0, 0 }, // 1 - { 0, GIE::TaggedArgument, "tqcontains", 3, 0, 0 }, // 2 + { 0, GIE::TaggedArgument, "contains", 3, 0, 0 }, // 2 // accept both string and string-list: { 0, GIE::StringArgument, "x-spam-flag", 9, 4, "x-spam-flag" }, // 3 @@ -232,7 +232,7 @@ namespace { { 0, GIE::TestEnd, 0, 16, 0, 0 }, // 15 - // block of command, tqfind "stop", take nested if's into account: + // block of command, find "stop", take nested if's into account: { 0, GIE::BlockStart, 0, 17, 0, 0 }, // 16 { 1, GIE::CommandStart, "stop", 20, 19, "stop" }, // 17 { -1, GIE::Any, 0, 17, 0, 0 }, // 18 @@ -259,7 +259,7 @@ namespace { // to understand this table, study the output of // libksieve/tests/parsertest - // 'if not address :domain :tqcontains ["from"] ["mydomain.org"] { keep; stop; }' + // 'if not address :domain :contains ["from"] ["mydomain.org"] { keep; stop; }' static const GenericInformationExtractor::StateNode domainNodes[] = { { 0, GIE::CommandStart, "if", 1, 0, 0 }, // 0 { 0, GIE::TestStart, "not", 2, 0, 0, }, // 1 @@ -267,8 +267,8 @@ namespace { // :domain and :contains in arbitrary order: { 0, GIE::TaggedArgument, "domain", 4, 5, 0 }, // 3 - { 0, GIE::TaggedArgument, "tqcontains", 7, 0, 0 }, // 4 - { 0, GIE::TaggedArgument, "tqcontains", 6, 0, 0 }, // 5 + { 0, GIE::TaggedArgument, "contains", 7, 0, 0 }, // 4 + { 0, GIE::TaggedArgument, "contains", 6, 0, 0 }, // 5 { 0, GIE::TaggedArgument, "domain", 7, 0, 0 }, // 6 // accept both string and string-list: @@ -288,7 +288,7 @@ namespace { { 0, GIE::TestEnd, 0, 18, 0, 0 }, // 17 { 0, GIE::TestEnd, 0, 19, 0, 0 }, // 18 - // block of commands, tqfind "stop", take nested if's into account: + // block of commands, find "stop", take nested if's into account: { 0, GIE::BlockStart, 0, 20, 0, 0 }, // 19 { 1, GIE::CommandStart, "stop", 23, 22, "stop" }, // 20 { -1, GIE::Any, 0, 20, 0, 0 }, // 21 @@ -448,9 +448,9 @@ namespace KMail { static inline TQString dotstuff( TQString s ) { if ( s.startsWith( "." ) ) - return '.' + s.tqreplace( "\n.", "\n.." ); + return '.' + s.replace( "\n.", "\n.." ); else - return s.tqreplace( "\n.", "\n.." ); + return s.replace( "\n.", "\n.." ); } TQString Vacation::composeScript( const TQString & messageText, @@ -464,18 +464,18 @@ namespace KMail { addressesArgument += ":addresses [ "; TQStringList sl; for ( AddrSpecList::const_iterator it = addrSpecs.begin() ; it != addrSpecs.end() ; ++it ) { - sl.push_back( '"' + (*it).asString().tqreplace( '\\', "\\\\" ).tqreplace( '"', "\\\"" ) + '"' ); + sl.push_back( '"' + (*it).asString().replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"' ); aliases.push_back( (*it).asString() ); } addressesArgument += sl.join( ", " ) + " ] "; } TQString script = TQString::tqfromLatin1("require \"vacation\";\n\n" ); if ( !sendForSpam ) - script += TQString::tqfromLatin1( "if header :tqcontains \"X-Spam-Flag\" \"YES\"" + script += TQString::tqfromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\"" " { keep; stop; }\n" ); // FIXME? if ( !domain.isEmpty() ) // FIXME - script += TQString::tqfromLatin1( "if not address :domain :tqcontains \"from\" \"%1\" { keep; stop; }\n" ).tqarg( domain ); + script += TQString::tqfromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).tqarg( domain ); script += "vacation "; script += addressesArgument; @@ -608,7 +608,7 @@ namespace KMail { mSieveJob = 0; // job deletes itself after returning from this slot! if ( !mCheckOnly && mUrl.protocol() == "sieve" && !job->sieveCapabilities().isEmpty() && - !job->sieveCapabilities().tqcontains("vacation") ) { + !job->sieveCapabilities().contains("vacation") ) { KMessageBox::sorry( 0, i18n("Your server did not list \"vacation\" in " "its list of supported Sieve extensions;\n" "without it, KMail cannot install out-of-" |