diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:59:50 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:59:50 -0600 |
commit | 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch) | |
tree | ab537a329b9613e11dce8195761f93ffe82aed24 /kmail/kmfilteraction.cpp | |
parent | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff) | |
download | tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
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 d31eaf7a8..6a5e12324 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -44,11 +44,11 @@ using KMail::RegExpLineEdit; #include <kurlrequester.h> #include <tqlabel.h> -#include <layout.h> -#include <textcodec.h> +#include <tqlayout.h> +#include <tqtextcodec.h> #include <tqtimer.h> #include <tqobject.h> -#include <stylesheet.h> +#include <tqstylesheet.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("").arg( ); + // return i18n("").tqarg( ); 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("").arg( ); + // return i18n("").tqarg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -483,11 +483,11 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs } tf->close(); } - // TQString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 ) + // TQString( "%0 and %1 and %1" ).tqarg( 0 ).tqarg( 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.arg( tempFileName ); + else result = result.tqarg( tempFileName ); } // And finally, replace the %{foo} with the content of the foo @@ -742,13 +742,13 @@ void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const } //============================================================================= -// KMFilterActionSeStatus - set status to +// KMFilterActionSetqStatus - set status to // Set the status of messages //============================================================================= -class KMFilterActionSeStatus: public KMFilterActionWithStringList +class KMFilterActionSetqStatus: public KMFilterActionWithStringList { public: - KMFilterActionSeStatus(); + KMFilterActionSetqStatus(); virtual ReturnCode process(KMMessage* msg) const; virtual bool requiresBody(KMMsgBase*) const; @@ -762,7 +762,7 @@ public: }; -static const KMMsgStatus stati[] = +static const KMMsgtqStatus stati[] = { KMMsgStatusFlag, KMMsgStatusRead, @@ -776,18 +776,18 @@ static const KMMsgStatus stati[] = KMMsgStatusSpam, KMMsgStatusHam }; -static const int StatiCount = sizeof( stati ) / sizeof( KMMsgStatus ); +static const int StatiCount = sizeof( stati ) / sizeof( KMMsgtqStatus ); -KMFilterAction* KMFilterActionSeStatus::newAction() +KMFilterAction* KMFilterActionSetqStatus::newAction() { - return (new KMFilterActionSeStatus); + return (new KMFilterActionSetqStatus); } -KMFilterActionSeStatus::KMFilterActionSeStatus() +KMFilterActionSetqStatus::KMFilterActionSetqStatus() : KMFilterActionWithStringList( "set status", i18n("Mark As") ) { // if you change this list, also update - // KMFilterActionSeStatus::stati above + // KMFilterActionSetqStatus::stati above mParameterList.append( "" ); mParameterList.append( i18n("msg status","Important") ); mParameterList.append( i18n("msg status","Read") ); @@ -804,22 +804,22 @@ KMFilterActionSeStatus::KMFilterActionSeStatus() mParameter = *mParameterList.at(0); } -KMFilterAction::ReturnCode KMFilterActionSeStatus::process(KMMessage* msg) const +KMFilterAction::ReturnCode KMFilterActionSetqStatus::process(KMMessage* msg) const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; - KMMsgStatus status = stati[idx-1] ; - msg->seStatus( status ); + KMMsgtqStatus status = stati[idx-1] ; + msg->setqStatus( status ); return GoOn; } -bool KMFilterActionSeStatus::requiresBody(KMMsgBase*) const +bool KMFilterActionSetqStatus::requiresBody(KMMsgBase*) const { return false; } -void KMFilterActionSeStatus::argsFromString( const TQString argsStr ) +void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) { if ( argsStr.length() == 1 ) { for ( int i = 0 ; i < StatiCount ; i++ ) @@ -831,19 +831,19 @@ void KMFilterActionSeStatus::argsFromString( const TQString argsStr ) mParameter = *mParameterList.at(0); } -const TQString KMFilterActionSeStatus::argsAsString() const +const TQString KMFilterActionSetqStatus::argsAsString() const { int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); - KMMsgStatus status = stati[idx-1]; + KMMsgtqStatus status = stati[idx-1]; return KMMsgBase::statusToStr(status); } -const TQString KMFilterActionSeStatus::displayString() const +const TQString KMFilterActionSetqStatus::displayString() const { // FIXME after string freeze: - // return i18n("").arg( ); + // return i18n("").tqarg( ); 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("").arg( ); + // return i18n("").tqarg( ); 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->sizeHint().width() ); + l->setFixedWidth( l->tqsizeHint().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("").arg( ); + // return i18n("").tqarg( ); 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->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" ); @@ -1299,7 +1299,7 @@ const TQString KMFilterActionRewriteHeader::argsAsString() const const TQString KMFilterActionRewriteHeader::displayString() const { // FIXME after string freeze: - // return i18n("").arg( ); + // return i18n("").tqarg( ); 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 " ).arg( mParameter ); + return i18n( "Forward to %1 with default template " ).tqarg( mParameter ); else - return i18n( "Forward to %1 with template %2" ).arg( mParameter, mTemplate ); + return i18n( "Forward to %1 with template %2" ).tqarg( 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 oldStatus = handler->ignoreChanges( true ); + bool oldtqStatus = handler->ignoreChanges( true ); filterFolder->take( filterFolder->find( mMsg ) ); filterFolder->addMsg( mMsg ); - handler->ignoreChanges( oldStatus ); + handler->ignoreChanges( oldtqStatus ); } 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("").arg( ); + // return i18n("").tqarg( ); 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::fromLatin1("file:"); + TQString file = TQString::tqfromLatin1("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("").arg( ); + // return i18n("").tqarg( ); return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1970,7 +1970,7 @@ void KMFilterActionDict::init(void) insert( KMFilterActionMove::newAction ); insert( KMFilterActionCopy::newAction ); insert( KMFilterActionIdentity::newAction ); - insert( KMFilterActionSeStatus::newAction ); + insert( KMFilterActionSetqStatus::newAction ); insert( KMFilterActionFakeDisposition::newAction ); insert( KMFilterActionTransport::newAction ); insert( KMFilterActionReplyTo::newAction ); |