diff options
Diffstat (limited to 'kmail/kmfiltermgr.cpp')
-rw-r--r-- | kmail/kmfiltermgr.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp index c75404f8f..13e5e0f1e 100644 --- a/kmail/kmfiltermgr.cpp +++ b/kmail/kmfiltermgr.cpp @@ -26,8 +26,8 @@ using KMail::MessageProperty; #include <kconfig.h> // other Qt headers -#include <qregexp.h> -#include <qvaluevector.h> +#include <tqregexp.h> +#include <tqvaluevector.h> // other headers #include <assert.h> @@ -44,8 +44,8 @@ KMFilterMgr::KMFilterMgr( bool popFilter ) { if (bPopFilter) kdDebug(5006) << "pPopFilter set" << endl; - connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ), - this, SLOT( slotFolderRemoved( KMFolder* ) ) ); + connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ), + this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) ); } @@ -60,7 +60,7 @@ KMFilterMgr::~KMFilterMgr() void KMFilterMgr::clear() { mDirtyBufferedFolderTarget = true; - for ( QValueListIterator<KMFilter*> it = mFilters.begin() ; + for ( TQValueListIterator<KMFilter*> it = mFilters.begin() ; it != mFilters.end() ; ++it ) { delete *it; } @@ -94,7 +94,7 @@ void KMFilterMgr::writeConfig(bool withSync) } int KMFilterMgr::processPop( KMMessage * msg ) const { - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); it != mFilters.constEnd() ; ++it ) if ( (*it)->pattern()->matches( msg ) ) return (*it)->action(); @@ -149,7 +149,7 @@ int KMFilterMgr::process( KMMessage * msg, const KMFilter * filter ) { int result = 1; if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( filter->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -241,7 +241,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set, if (!beginFiltering( msg )) return 1; - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); !stopIt && it != mFilters.constEnd() ; ++it ) { if ( ( ( (set&Inbound) && (*it)->applyOnInbound() ) && @@ -252,7 +252,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set, // filter is applicable if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( (*it)->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -290,7 +290,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter ) { bool result = false; if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( filter->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -306,7 +306,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter ) bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { if ( (*it)->applyOnAccount( accountID ) ) { return true; @@ -317,7 +317,7 @@ bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const bool KMFilterMgr::atLeastOneIncomingFilterAppliesTo( unsigned int accountID ) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { if ( (*it)->applyOnInbound() && (*it)->applyOnAccount( accountID ) ) { return true; @@ -333,15 +333,15 @@ bool KMFilterMgr::atLeastOneOnlineImapFolderTarget() mDirtyBufferedFolderTarget = false; - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { KMFilter *filter = *it; - QPtrListIterator<KMFilterAction> jt( *filter->actions() ); + TQPtrListIterator<KMFilterAction> jt( *filter->actions() ); for ( jt.toFirst() ; jt.current() ; ++jt ) { KMFilterActionWithFolder *f = dynamic_cast<KMFilterActionWithFolder*>(*jt); if (!f) continue; - QString name = f->argsAsString(); + TQString name = f->argsAsString(); KMFolder *folder = kmkernel->imapFolderMgr()->findIdString( name ); if (folder) { mBufferedFolderTarget = true; @@ -368,7 +368,7 @@ void KMFilterMgr::deref(bool force) mRefCount = 0; if (mRefCount && !force) return; - QValueVector< KMFolder *>::const_iterator it; + TQValueVector< KMFolder *>::const_iterator it; for ( it = mOpenFolders.constBegin(); it != mOpenFolders.constEnd(); ++it ) (*it)->close("filtermgr"); mOpenFolders.clear(); @@ -389,7 +389,7 @@ int KMFilterMgr::tempOpenFolder(KMFolder* aFolder) //----------------------------------------------------------------------------- -void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList ) +void KMFilterMgr::openDialog( TQWidget *, bool checkForEmptyFilterList ) { if( !mEditDialog ) { @@ -405,7 +405,7 @@ void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList ) //----------------------------------------------------------------------------- -void KMFilterMgr::createFilter( const QCString & field, const QString & value ) +void KMFilterMgr::createFilter( const TQCString & field, const TQString & value ) { openDialog( 0, false ); mEditDialog->createFilter( field, value ); @@ -413,22 +413,22 @@ void KMFilterMgr::createFilter( const QCString & field, const QString & value ) //----------------------------------------------------------------------------- -const QString KMFilterMgr::createUniqueName( const QString & name ) +const TQString KMFilterMgr::createUniqueName( const TQString & name ) { - QString uniqueName = name; + TQString uniqueName = name; int counter = 0; bool found = true; while ( found ) { found = false; - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); it != mFilters.constEnd(); ++it ) { if ( !( (*it)->name().compare( uniqueName ) ) ) { found = true; ++counter; uniqueName = name; - uniqueName += QString( " (" ) + QString::number( counter ) - + QString( ")" ); + uniqueName += TQString( " (" ) + TQString::number( counter ) + + TQString( ")" ); break; } } @@ -438,15 +438,15 @@ const QString KMFilterMgr::createUniqueName( const QString & name ) //----------------------------------------------------------------------------- -void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters, +void KMFilterMgr::appendFilters( const TQValueList<KMFilter*> &filters, bool replaceIfNameExists ) { mDirtyBufferedFolderTarget = true; beginUpdate(); if ( replaceIfNameExists ) { - QValueListConstIterator<KMFilter*> it1 = filters.constBegin(); + TQValueListConstIterator<KMFilter*> it1 = filters.constBegin(); for ( ; it1 != filters.constEnd() ; ++it1 ) { - QValueListConstIterator<KMFilter*> it2 = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it2 = mFilters.constBegin(); for ( ; it2 != mFilters.constEnd() ; ++it2 ) { if ( (*it1)->name() == (*it2)->name() ) { mFilters.remove( (*it2) ); @@ -460,7 +460,7 @@ void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters, endUpdate(); } -void KMFilterMgr::setFilters( const QValueList<KMFilter*> &filters ) +void KMFilterMgr::setFilters( const TQValueList<KMFilter*> &filters ) { beginUpdate(); clear(); @@ -479,7 +479,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder) { mDirtyBufferedFolderTarget = true; bool rem = false; - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) if ( (*it)->folderRemoved(aFolder, aNewFolder) ) rem = true; @@ -493,7 +493,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder) void KMFilterMgr::dump(void) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { kdDebug(5006) << (*it)->asString() << endl; } |