diff options
Diffstat (limited to 'kmail/kmfilteraction.cpp')
-rw-r--r-- | kmail/kmfilteraction.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index 6a5e12324..d31eaf7a8 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -44,11 +44,11 @@ using KMail::RegExpLineEdit; #include <kurlrequester.h> #include <tqlabel.h> -#include <tqlayout.h> -#include <tqtextcodec.h> +#include <layout.h> +#include <textcodec.h> #include <tqtimer.h> #include <tqobject.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqtooltip.h> #include <tqwhatsthis.h> #include <assert.h> @@ -185,7 +185,7 @@ const TQString KMFilterActionWithUOID::argsAsString() const const TQString KMFilterActionWithUOID::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -236,7 +236,7 @@ const TQString KMFilterActionWithString::argsAsString() const const TQString KMFilterActionWithString::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -483,11 +483,11 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs } tf->close(); } - // TQString( "%0 and %1 and %1" ).tqarg( 0 ).tqarg( 1 ) + // TQString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 ) // returns "0 and 1 and %1", so we must call .arg as // many times as there are %n's, regardless of their multiplicity. if ((*it) == -1) result.replace( "%-1", tempFileName ); - else result = result.tqarg( tempFileName ); + else result = result.arg( tempFileName ); } // And finally, replace the %{foo} with the content of the foo @@ -742,13 +742,13 @@ void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const } //============================================================================= -// KMFilterActionSetqStatus - set status to +// KMFilterActionSeStatus - set status to // Set the status of messages //============================================================================= -class KMFilterActionSetqStatus: public KMFilterActionWithStringList +class KMFilterActionSeStatus: public KMFilterActionWithStringList { public: - KMFilterActionSetqStatus(); + KMFilterActionSeStatus(); virtual ReturnCode process(KMMessage* msg) const; virtual bool requiresBody(KMMsgBase*) const; @@ -762,7 +762,7 @@ public: }; -static const KMMsgtqStatus stati[] = +static const KMMsgStatus stati[] = { KMMsgStatusFlag, KMMsgStatusRead, @@ -776,18 +776,18 @@ static const KMMsgtqStatus stati[] = KMMsgStatusSpam, KMMsgStatusHam }; -static const int StatiCount = sizeof( stati ) / sizeof( KMMsgtqStatus ); +static const int StatiCount = sizeof( stati ) / sizeof( KMMsgStatus ); -KMFilterAction* KMFilterActionSetqStatus::newAction() +KMFilterAction* KMFilterActionSeStatus::newAction() { - return (new KMFilterActionSetqStatus); + return (new KMFilterActionSeStatus); } -KMFilterActionSetqStatus::KMFilterActionSetqStatus() +KMFilterActionSeStatus::KMFilterActionSeStatus() : KMFilterActionWithStringList( "set status", i18n("Mark As") ) { // if you change this list, also update - // KMFilterActionSetqStatus::stati above + // KMFilterActionSeStatus::stati above mParameterList.append( "" ); mParameterList.append( i18n("msg status","Important") ); mParameterList.append( i18n("msg status","Read") ); @@ -804,22 +804,22 @@ KMFilterActionSetqStatus::KMFilterActionSetqStatus() mParameter = *mParameterList.at(0); } -KMFilterAction::ReturnCode KMFilterActionSetqStatus::process(KMMessage* msg) const +KMFilterAction::ReturnCode KMFilterActionSeStatus::process(KMMessage* msg) const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; - KMMsgtqStatus status = stati[idx-1] ; - msg->setqStatus( status ); + KMMsgStatus status = stati[idx-1] ; + msg->seStatus( status ); return GoOn; } -bool KMFilterActionSetqStatus::requiresBody(KMMsgBase*) const +bool KMFilterActionSeStatus::requiresBody(KMMsgBase*) const { return false; } -void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) +void KMFilterActionSeStatus::argsFromString( const TQString argsStr ) { if ( argsStr.length() == 1 ) { for ( int i = 0 ; i < StatiCount ; i++ ) @@ -831,19 +831,19 @@ void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) mParameter = *mParameterList.at(0); } -const TQString KMFilterActionSetqStatus::argsAsString() const +const TQString KMFilterActionSeStatus::argsAsString() const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); - KMMsgtqStatus status = stati[idx-1]; + KMMsgStatus status = stati[idx-1]; return KMMsgBase::statusToStr(status); } -const TQString KMFilterActionSetqStatus::displayString() const +const TQString KMFilterActionSeStatus::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -938,7 +938,7 @@ const TQString KMFilterActionFakeDisposition::argsAsString() const const TQString KMFilterActionFakeDisposition::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1064,7 +1064,7 @@ TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* parent ) const cb->setInsertionPolicy( TQComboBox::AtBottom ); hbl->addWidget( cb, 0 /* stretch */ ); TQLabel *l = new TQLabel( i18n("With value:"), w ); - l->setFixedWidth( l->tqsizeHint().width() ); + l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); TQLineEdit *le = new KLineEdit( w, "ledit" ); hbl->addWidget( le, 1 ); @@ -1123,7 +1123,7 @@ const TQString KMFilterActionAddHeader::argsAsString() const const TQString KMFilterActionAddHeader::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1214,14 +1214,14 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) con hbl->addWidget( cb, 0 /* stretch */ ); TQLabel *l = new TQLabel( i18n("Replace:"), w ); - l->setFixedWidth( l->tqsizeHint().width() ); + l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); RegExpLineEdit *rele = new RegExpLineEdit( w, "search" ); hbl->addWidget( rele, 1 ); l = new TQLabel( i18n("With:"), w ); - l->setFixedWidth( l->tqsizeHint().width() ); + l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); TQLineEdit *le = new KLineEdit( w, "replace" ); @@ -1299,7 +1299,7 @@ const TQString KMFilterActionRewriteHeader::argsAsString() const const TQString KMFilterActionRewriteHeader::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1617,9 +1617,9 @@ const TQString KMFilterActionForward::argsAsString() const const TQString KMFilterActionForward::displayString() const { if ( mTemplate.isEmpty() ) - return i18n( "Forward to %1 with default template " ).tqarg( mParameter ); + return i18n( "Forward to %1 with default template " ).arg( mParameter ); else - return i18n( "Forward to %1 with template %2" ).tqarg( mParameter, mTemplate ); + return i18n( "Forward to %1 with template %2" ).arg( mParameter, mTemplate ); } //============================================================================= @@ -1744,10 +1744,10 @@ class PipeJob : public KPIM::ThreadWeaver::Job if ( !origSerNum.isEmpty() ) mMsg->setHeaderField( "X-KMail-Filtered", origSerNum ); if ( filterFolder && handler ) { - bool oldtqStatus = handler->ignoreChanges( true ); + bool oldStatus = handler->ignoreChanges( true ); filterFolder->take( filterFolder->find( mMsg ) ); filterFolder->addMsg( mMsg ); - handler->ignoreChanges( oldtqStatus ); + handler->ignoreChanges( oldStatus ); } else { kdDebug(5006) << "Warning: Cannot refresh the message from the external filter." << endl; } @@ -1878,7 +1878,7 @@ const TQString KMFilterActionWithTest::argsAsString() const const TQString KMFilterActionWithTest::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1898,7 +1898,7 @@ KMFilterAction::ReturnCode KMFilterActionExecSound::process(KMMessage*) const if ( mParameter.isEmpty() ) return ErrorButGoOn; TQString play = mParameter; - TQString file = TQString::tqfromLatin1("file:"); + TQString file = TQString::fromLatin1("file:"); if (mParameter.startsWith(file)) play = mParameter.mid(file.length()); KAudioPlayer::play(TQFile::encodeName(play)); @@ -1955,7 +1955,7 @@ const TQString KMFilterActionWithUrl::argsAsString() const const TQString KMFilterActionWithUrl::displayString() const { // FIXME after string freeze: - // return i18n("").tqarg( ); + // return i18n("").arg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1970,7 +1970,7 @@ void KMFilterActionDict::init(void) insert( KMFilterActionMove::newAction ); insert( KMFilterActionCopy::newAction ); insert( KMFilterActionIdentity::newAction ); - insert( KMFilterActionSetqStatus::newAction ); + insert( KMFilterActionSeStatus::newAction ); insert( KMFilterActionFakeDisposition::newAction ); insert( KMFilterActionTransport::newAction ); insert( KMFilterActionReplyTo::newAction ); |