diff options
Diffstat (limited to 'libkdepim/addresseelineedit.cpp')
-rw-r--r-- | libkdepim/addresseelineedit.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index 9e42085b5..63473a6f1 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -285,13 +285,13 @@ void AddresseeLineEdit::insert( const TQString &t ) KURL url( newText ); newText = url.path(); } - else if ( newText.tqfind(" at ") != -1 ) { + else if ( newText.find(" at ") != -1 ) { // Anti-spam stuff - newText.tqreplace( " at ", "@" ); - newText.tqreplace( " dot ", "." ); + newText.replace( " at ", "@" ); + newText.replace( " dot ", "." ); } - else if ( newText.tqfind("(at)") != -1 ) { - newText.tqreplace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + else if ( newText.find("(at)") != -1 ) { + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } TQString contents = text(); @@ -567,7 +567,7 @@ void AddresseeLineEdit::loadContacts() KABC::Resource::Iterator it; for ( it = resource->begin(); it != resource->end(); ++it ) { TQString uid = (*it).uid(); - TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.tqfind( uid ); + TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.find( uid ); const TQString subresourceLabel = resabc->subresourceLabel( *wit ); const int weight = ( wit != uidToResourceMap.end() ) ? resabc->subresourceCompletionWeight( *wit ) : 80; const int idx = addCompletionSource( subresourceLabel, weight ); @@ -641,7 +641,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int const TQString givenName = addr.givenName(); const TQString familyName= addr.familyName(); const TQString nickName = addr.nickName(); - const TQString domain = email.mid( email.tqfind( '@' ) + 1 ); + const TQString domain = email.mid( email.find( '@' ) + 1 ); TQString fullEmail = addr.fullEmail( email ); //TODO: let user decide what fields to use in lookup, e.g. company, city, ... @@ -698,7 +698,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int * We remove the <blank> in getAdjustedCompletionItems. */ if ( isPrefEmail == prefEmailWeight ) - fullEmail.tqreplace( " <", " <" ); + fullEmail.replace( " <", " <" ); addCompletionItem( fullEmail, weight + isPrefEmail, source, &keyWords ); isPrefEmail = 0; @@ -727,7 +727,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int bool bDone = false; int i = -1; - while( ( i = name.tqfindRev(' ') ) > 1 && !bDone ) { + while( ( i = name.findRev(' ') ) > 1 && !bDone ) { TQString sLastName( name.mid( i+1 ) ); if( ! sLastName.isEmpty() && 2 <= sLastName.length() && // last names must be at least 2 chars long @@ -758,7 +758,7 @@ void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, i { // Check if there is an exact match for item already, and use the max weight if so. // Since there's no way to get the information from KCompletion, we have to keep our own TQMap - CompletionItemsMap::iterator it = s_completionItemMap->tqfind( string ); + CompletionItemsMap::iterator it = s_completionItemMap->find( string ); if ( it != s_completionItemMap->end() ) { weight = TQMAX( ( *it ).first, weight ); ( *it ).first = weight; @@ -798,7 +798,7 @@ void AddresseeLineEdit::startLoadingLDAPEntries() TQString s( *s_LDAPText ); // TODO cache last? TQString prevAddr; - int n = s.tqfindRev( ',' ); + int n = s.findRev( ',' ); if ( n >= 0 ) { prevAddr = s.left( n + 1 ) + ' '; s = s.mid( n + 1, 255 ).stripWhiteSpace(); @@ -821,7 +821,7 @@ void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList& adrs ) addr.setNameFromString( (*it).name ); addr.setEmails( (*it).email ); - if ( !s_ldapClientToCompletionSourceMap->tqcontains( (*it).clientNumber ) ) + if ( !s_ldapClientToCompletionSourceMap->contains( (*it).clientNumber ) ) updateLDAPWeights(); // we got results from a new source, so update the completion sources addContact( addr, (*it).completionWeight, (*s_ldapClientToCompletionSourceMap)[ (*it ).clientNumber ] ); @@ -872,13 +872,13 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS // item, if there is one TQListBoxItem* item = 0; if ( oldCurrentText.isEmpty() - || ( item = completionBox->tqfindItem( oldCurrentText ) ) == 0 ) { + || ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) { item = completionBox->item( 1 ); } if ( item ) { if ( itemUnderMouse ) { - TQListBoxItem *newItemUnderMouse = completionBox->tqfindItem( oldTextUnderMouse ); + TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse ); // if the mouse was over an item, before, but now that's elsewhere, // move the cursor, so folks don't accidently click the wrong item if ( newItemUnderMouse ) { @@ -900,7 +900,7 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS if ( autoSuggest ) { - int index = items.first().tqfind( m_searchString ); + int index = items.first().find( m_searchString ); TQString newText = items.first().mid( index ); setUserSelection(false); setCompletedText(newText,true); @@ -1020,13 +1020,13 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder() int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int weight ) { - TQMap<TQString,int>::iterator it = s_completionSourceWeights->tqfind( source ); + TQMap<TQString,int>::iterator it = s_completionSourceWeights->find( source ); if ( it == s_completionSourceWeights->end() ) s_completionSourceWeights->insert( source, weight ); else (*s_completionSourceWeights)[source] = weight; - int sourceIndex = s_completionSources->tqfindIndex( source ); + int sourceIndex = s_completionSources->findIndex( source ); if ( sourceIndex == -1 ) { s_completionSources->append( source ); return s_completionSources->size() - 1; @@ -1228,7 +1228,7 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful TQMap<int, TQStringList> sections; TQStringList sortedItems; for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) { - CompletionItemsMap::const_iterator cit = s_completionItemMap->tqfind(*it); + CompletionItemsMap::const_iterator cit = s_completionItemMap->find(*it); if ( cit == s_completionItemMap->end() ) continue; int idx = (*cit).second; @@ -1236,14 +1236,14 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful if ( s_completion->order() == KCompletion::Weighted ) { if ( lastSourceIndex == -1 || lastSourceIndex != idx ) { const TQString sourceLabel( (*s_completionSources)[idx] ); - if ( sections.tqfind(idx) == sections.end() ) { + if ( sections.find(idx) == sections.end() ) { items.insert( it, sourceLabel ); } lastSourceIndex = idx; } (*it) = (*it).prepend( s_completionItemIndentString ); // remove preferred email sort <blank> added in addContact() - (*it).tqreplace( " <", " <" ); + (*it).replace( " <", " <" ); } sections[idx].append( *it ); |