diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /kmail/kmfilteraction.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmfilteraction.cpp')
-rw-r--r-- | kmail/kmfilteraction.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index 9b277d8e7..180c2746f 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -486,18 +486,18 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs // 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 ); + if ((*it) == -1) result.tqreplace( "%-1", tempFileName ); else result = result.arg( tempFileName ); } - // And finally, replace the %{foo} with the content of the foo + // And finally, tqreplace the %{foo} with the content of the foo // header field: TQRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false ); int idx = 0; while ( ( idx = header_rx.search( result, idx ) ) != -1 ) { - TQString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) ); - result.replace( idx, header_rx.matchedLength(), replacement ); - idx += replacement.length(); + TQString tqreplacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) ); + result.tqreplace( idx, header_rx.matchedLength(), tqreplacement ); + idx += tqreplacement.length(); } return result; @@ -742,13 +742,13 @@ void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const } //============================================================================= -// KMFilterActionSetStatus - set status to +// KMFilterActionSeStatus - set status to // Set the status of messages //============================================================================= -class KMFilterActionSetStatus: public KMFilterActionWithStringList +class KMFilterActionSeStatus: public KMFilterActionWithStringList { public: - KMFilterActionSetStatus(); + KMFilterActionSeStatus(); virtual ReturnCode process(KMMessage* msg) const; virtual bool requiresBody(KMMsgBase*) const; @@ -778,16 +778,16 @@ static const KMMsgStatus stati[] = }; static const int StatiCount = sizeof( stati ) / sizeof( KMMsgStatus ); -KMFilterAction* KMFilterActionSetStatus::newAction() +KMFilterAction* KMFilterActionSeStatus::newAction() { - return (new KMFilterActionSetStatus); + return (new KMFilterActionSeStatus); } -KMFilterActionSetStatus::KMFilterActionSetStatus() +KMFilterActionSeStatus::KMFilterActionSeStatus() : KMFilterActionWithStringList( "set status", i18n("Mark As") ) { // if you change this list, also update - // KMFilterActionSetStatus::stati above + // KMFilterActionSeStatus::stati above mParameterList.append( "" ); mParameterList.append( i18n("msg status","Important") ); mParameterList.append( i18n("msg status","Read") ); @@ -804,22 +804,22 @@ KMFilterActionSetStatus::KMFilterActionSetStatus() mParameter = *mParameterList.at(0); } -KMFilterAction::ReturnCode KMFilterActionSetStatus::process(KMMessage* msg) const +KMFilterAction::ReturnCode KMFilterActionSeStatus::process(KMMessage* msg) const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; KMMsgStatus status = stati[idx-1] ; - msg->setStatus( status ); + msg->seStatus( status ); return GoOn; } -bool KMFilterActionSetStatus::requiresBody(KMMsgBase*) const +bool KMFilterActionSeStatus::requiresBody(KMMsgBase*) const { return false; } -void KMFilterActionSetStatus::argsFromString( const TQString argsStr ) +void KMFilterActionSeStatus::argsFromString( const TQString argsStr ) { if ( argsStr.length() == 1 ) { for ( int i = 0 ; i < StatiCount ; i++ ) @@ -831,7 +831,7 @@ void KMFilterActionSetStatus::argsFromString( const TQString argsStr ) mParameter = *mParameterList.at(0); } -const TQString KMFilterActionSetStatus::argsAsString() const +const TQString KMFilterActionSeStatus::argsAsString() const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString::null; @@ -840,7 +840,7 @@ const TQString KMFilterActionSetStatus::argsAsString() const return KMMsgBase::statusToStr(status); } -const TQString KMFilterActionSetStatus::displayString() const +const TQString KMFilterActionSeStatus::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); @@ -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->sizeHint().width() ); + l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); TQLineEdit *le = new KLineEdit( w, "ledit" ); hbl->addWidget( le, 1 ); @@ -1194,9 +1194,9 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg) if ( mParameter.isEmpty() || !mRegExp.isValid() ) return ErrorButGoOn; - KRegExp3 rx = mRegExp; // KRegExp3::replace is not const. + KRegExp3 rx = mRegExp; // KRegExp3::tqreplace is not const. - TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ), + TQString newValue = rx.tqreplace( msg->headerField( mParameter.latin1() ), mReplacementString ); msg->setHeaderField( mParameter.latin1(), newValue ); @@ -1214,17 +1214,17 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) con hbl->addWidget( cb, 0 /* stretch */ ); TQLabel *l = new TQLabel( i18n("Replace:"), w ); - l->setFixedWidth( l->sizeHint().width() ); + l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); RegExpLineEdit *rele = new RegExpLineEdit( w, "search" ); hbl->addWidget( rele, 1 ); l = new TQLabel( i18n("With:"), w ); - l->setFixedWidth( l->sizeHint().width() ); + l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); - TQLineEdit *le = new KLineEdit( w, "replace" ); + TQLineEdit *le = new KLineEdit( w, "tqreplace" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); @@ -1250,7 +1250,7 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) c Q_ASSERT( rele ); rele->setText( mRegExp.pattern() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); Q_ASSERT( le ); le->setText( mReplacementString ); } @@ -1265,7 +1265,7 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget ) Q_ASSERT( rele ); mRegExp.setPattern( rele->text() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); Q_ASSERT( le ); mReplacementString = le->text(); } @@ -1280,7 +1280,7 @@ void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) cons Q_ASSERT( rele ); rele->clear(); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); Q_ASSERT( le ); le->clear(); } @@ -1898,7 +1898,7 @@ KMFilterAction::ReturnCode KMFilterActionExecSound::process(KMMessage*) const if ( mParameter.isEmpty() ) return ErrorButGoOn; TQString play = mParameter; - TQString file = TQString::fromLatin1("file:"); + TQString file = TQString::tqfromLatin1("file:"); if (mParameter.startsWith(file)) play = mParameter.mid(file.length()); KAudioPlayer::play(TQFile::encodeName(play)); @@ -1970,7 +1970,7 @@ void KMFilterActionDict::init(void) insert( KMFilterActionMove::newAction ); insert( KMFilterActionCopy::newAction ); insert( KMFilterActionIdentity::newAction ); - insert( KMFilterActionSetStatus::newAction ); + insert( KMFilterActionSeStatus::newAction ); insert( KMFilterActionFakeDisposition::newAction ); insert( KMFilterActionTransport::newAction ); insert( KMFilterActionReplyTo::newAction ); |