diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkdepim/kmailcompletion.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kmailcompletion.cpp')
-rw-r--r-- | libkdepim/kmailcompletion.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp index e7e9e17f2..98a3cb9ee 100644 --- a/libkdepim/kmailcompletion.cpp +++ b/libkdepim/kmailcompletion.cpp @@ -44,8 +44,8 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) // this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch if ( !match.isEmpty() ){ const TQString firstMatch( match ); - while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { - /* local email do not require @domain part, if match is an address we'll find + while ( match.tqfind( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { + /* local email do not require @domain part, if match is an address we'll tqfind * last+first <match> in m_keyMap and we'll know that match is already a valid email. * * Distribution list do not have last+first <match> entry, they will be in mailAddr @@ -53,7 +53,7 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword bool isEmail = false; for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) - if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) { + if ( (*sit).tqfind( "<" + match + ">" ) != -1 || (*sit) == match ) { isEmail = true; break; } @@ -62,7 +62,7 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) // match is a keyword, skip it and try to find match <email@domain> match = nextMatch(); if ( firstMatch == match ){ - match = TQString::null; + match = TQString(); break; } } else @@ -77,7 +77,7 @@ void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const Q_ASSERT( keyWords != 0 ); for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) { TQStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword - if ( emailList.find( email ) == emailList.end() ) //add email if not there + if ( emailList.tqfind( email ) == emailList.end() ) //add email if not there emailList.append( email ); addItem( (*it),weight ); //inform KCompletion about keyword } @@ -90,7 +90,7 @@ void KMailCompletion::postProcessMatches( TQStringList * pMatches )const return; //KCompletion has found the keywords for us, we can now map them to mail-addr - TQMap< TQString, bool > mailAddrDistinct; //TODO tqreplace with QSet in KDE4 + TQMap< TQString, bool > mailAddrDistinct; //TODO replace with TQSet in KDE4 for ( TQStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) { const TQStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) { |