From 10308be19ef7fa44699562cc75946e7ea1fdf6b9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 03:45:53 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kabc/addresslineedit.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kabc/addresslineedit.cpp') diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 07c6d76a5..b048d9f96 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -156,12 +156,12 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e) { bool accept = false; - if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).tqcontains(KKey(e))) + if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).contains(KKey(e))) { doCompletion(true); accept = true; } - else if (KStdAccel::shortcut(KStdAccel::TextCompletion).tqcontains(KKey(e))) + else if (KStdAccel::shortcut(KStdAccel::TextCompletion).contains(KKey(e))) { int len = text().length(); @@ -213,21 +213,21 @@ void AddressLineEdit::insert(const TQString &t) // remove newlines in the to-be-pasted string as well as an eventual // mailto: protocol - newText.tqreplace( TQRegExp("\r?\n"), ", " ); + newText.replace( TQRegExp("\r?\n"), ", " ); if ( newText.startsWith( "mailto:" ) ) { KURL u(newText); newText = u.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) + else if (newText.find("(at)") != -1) { - newText.tqreplace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } TQString contents = text(); @@ -293,7 +293,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) TQString prevAddr; TQString s(text()); - int n = s.tqfindRev(','); + int n = s.findRev(','); if (n >= 0) { @@ -343,7 +343,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) items += s_completion->substringCompletion( '<' + s ); uint beforeDollarCompletionCount = items.count(); - if( s.tqfind( ' ' ) == -1 ) // one word, possibly given name + if( s.find( ' ' ) == -1 ) // one word, possibly given name items += s_completion->allMatches( "$$" + s ); if ( !items.isEmpty() ) @@ -355,7 +355,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) it != items.end(); ++it ) { - int pos = (*it).tqfind( '$', 2 ); + int pos = (*it).find( '$', 2 ); if( pos < 0 ) // ??? continue; (*it)=(*it).mid( pos + 1 ); @@ -373,7 +373,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) if (!autoSuggest) { - int index = items.first().tqfind( s ); + int index = items.first().find( s ); TQString newText = prevAddr + items.first().mid( index ); //kdDebug() << "OLD TEXT: " << text() << endl; //kdDebug() << "NEW TEXT: " << newText << endl; @@ -437,11 +437,11 @@ void AddressLineEdit::loadAddresses() void AddressLineEdit::addAddress( const TQString& adr ) { s_completion->addItem( adr ); - int pos = adr.tqfind( '<' ); + int pos = adr.find( '<' ); if( pos >= 0 ) { ++pos; - int pos2 = adr.tqfind( pos, '>' ); + int pos2 = adr.find( pos, '>' ); if( pos2 >= 0 ) s_completion->addItem( adr.mid( pos, pos2 - pos )); } @@ -465,7 +465,7 @@ void AddressLineEdit::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) + ' '; @@ -484,8 +484,8 @@ void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) return; for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { TQString name(*it); - int pos = name.tqfind( " <" ); - int pos_comma = name.tqfind( ',' ); + int pos = name.find( " <" ); + int pos_comma = name.find( ',' ); // put name in quotes, if we have a comma in the name if (pos>0 && pos_comma>0 && pos_comma' ) == -1) - && (email.tqfind( ',' ) == -1)) + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) addr += '<' + email + '>'; else addr += email; -- cgit v1.2.3