summaryrefslogtreecommitdiffstats
path: root/libkdepim/kmailcompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/kmailcompletion.cpp')
-rw-r--r--libkdepim/kmailcompletion.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp
index 41d2f2ce..b7c37852 100644
--- a/libkdepim/kmailcompletion.cpp
+++ b/libkdepim/kmailcompletion.cpp
@@ -22,7 +22,7 @@
#include "kmailcompletion.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KPIM;
@@ -37,22 +37,22 @@ void KMailCompletion::clear()
KCompletion::clear();
}
-QString KMailCompletion::makeCompletion( const QString &string )
+TQString KMailCompletion::makeCompletion( const TQString &string )
{
- QString match = KCompletion::makeCompletion( string );
+ TQString match = KCompletion::makeCompletion( string );
// this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch
if ( !match.isEmpty() ){
- const QString firstMatch( match );
- while ( match.find( QRegExp( "(@)|(<.*>)" ) ) == -1 ) {
+ const TQString firstMatch( match );
+ while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) {
/* local email do not require @domain part, if match is an address we'll find
* 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
*/
- const QStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
+ const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
bool isEmail = false;
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
+ for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) {
isEmail = true;
break;
@@ -62,7 +62,7 @@ QString KMailCompletion::makeCompletion( const QString &string )
// match is a keyword, skip it and try to find match <email@domain>
match = nextMatch();
if ( firstMatch == match ){
- match = QString::null;
+ match = TQString::null;
break;
}
} else
@@ -72,29 +72,29 @@ QString KMailCompletion::makeCompletion( const QString &string )
return match;
}
-void KMailCompletion::addItemWithKeys( const QString& email, int weight, const QStringList* keyWords)
+void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const TQStringList* keyWords)
{
Q_ASSERT( keyWords != 0 );
- for ( QStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
- QStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword
+ 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
emailList.append( email );
addItem( (*it),weight ); //inform KCompletion about keyword
}
}
-void KMailCompletion::postProcessMatches( QStringList * pMatches )const
+void KMailCompletion::postProcessMatches( TQStringList * pMatches )const
{
Q_ASSERT( pMatches != 0 );
if ( pMatches->isEmpty() )
return;
//KCompletion has found the keywords for us, we can now map them to mail-addr
- QMap< QString, bool > mailAddrDistinct; //TODO replace with QSet in KDE4
- for ( QStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) {
- const QStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) {
- mailAddrDistinct[ (*sit) ] = true; //store mailAddr, QMap will make them unique
+ TQMap< TQString, bool > mailAddrDistinct; //TODO replace with QSet 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 ) {
+ mailAddrDistinct[ (*sit) ] = true; //store mailAddr, TQMap will make them unique
}
}
pMatches->clear(); //delete keywords