summaryrefslogtreecommitdiffstats
path: root/kmail/kmfilteraction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmfilteraction.cpp')
-rw-r--r--kmail/kmfilteraction.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp
index 180c2746f..c23a5644a 100644
--- a/kmail/kmfilteraction.cpp
+++ b/kmail/kmfilteraction.cpp
@@ -88,9 +88,9 @@ KMFilterAction* KMFilterAction::newAction()
return 0;
}
-TQWidget* KMFilterAction::createParamWidget(TQWidget* parent) const
+TQWidget* KMFilterAction::createParamWidget(TQWidget* tqparent) const
{
- return new TQWidget(parent);
+ return new TQWidget(tqparent);
}
void KMFilterAction::applyParamWidgetValue(TQWidget*)
@@ -201,9 +201,9 @@ KMFilterActionWithString::KMFilterActionWithString( const char* aName, const TQS
{
}
-TQWidget* KMFilterActionWithString::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithString::createParamWidget( TQWidget* tqparent ) const
{
- TQLineEdit *le = new KLineEdit(parent);
+ TQLineEdit *le = new KLineEdit(tqparent);
le->setText( mParameter );
return le;
}
@@ -251,9 +251,9 @@ KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, c
{
}
-TQWidget* KMFilterActionWithStringList::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithStringList::createParamWidget( TQWidget* tqparent ) const
{
- TQComboBox *cb = new TQComboBox( false, parent );
+ TQComboBox *cb = new TQComboBox( false, tqparent );
cb->insertStringList( mParameterList );
setParamWidgetValue( cb );
return cb;
@@ -298,9 +298,9 @@ KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const TQS
mFolder = 0;
}
-TQWidget* KMFilterActionWithFolder::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithFolder::createParamWidget( TQWidget* tqparent ) const
{
- FolderRequester *req = new FolderRequester( parent,
+ FolderRequester *req = new FolderRequester( tqparent,
kmkernel->getKMMainWidget()->folderTree() );
setParamWidgetValue( req );
return req;
@@ -380,9 +380,9 @@ KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const T
{
}
-TQWidget* KMFilterActionWithAddress::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithAddress::createParamWidget( TQWidget* tqparent ) const
{
- KMFilterActionWithAddressWidget *w = new KMFilterActionWithAddressWidget(parent);
+ KMFilterActionWithAddressWidget *w = new KMFilterActionWithAddressWidget(tqparent);
w->setText( mParameter );
return w;
}
@@ -413,9 +413,9 @@ KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const T
{
}
-TQWidget* KMFilterActionWithCommand::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithCommand::createParamWidget( TQWidget* tqparent ) const
{
- return KMFilterActionWithUrl::createParamWidget( parent );
+ return KMFilterActionWithUrl::createParamWidget( tqparent );
}
void KMFilterActionWithCommand::applyParamWidgetValue( TQWidget* paramWidget )
@@ -464,7 +464,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs
tf->close();
delete tf;
kdDebug(5006) << "KMFilterActionWithCommand: Could not create temp file!" << endl;
- return TQString::null;
+ return TQString();
}
tf->setAutoDelete(true);
aTempFileList.append( tf );
@@ -490,14 +490,14 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs
else result = result.arg( tempFileName );
}
- // And finally, tqreplace the %{foo} with the content of the foo
+ // And finally, replace 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 tqreplacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
- result.tqreplace( idx, header_rx.matchedLength(), tqreplacement );
- idx += tqreplacement.length();
+ TQString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
+ result.tqreplace( idx, header_rx.matchedLength(), replacement );
+ idx += replacement.length();
}
return result;
@@ -524,7 +524,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
if ( commandLine.isEmpty() )
return ErrorButGoOn;
- // The parentheses force the creation of a subshell
+ // The tqparentheses force the creation of a subshell
// in which the user-specified command is executed.
// This is to really catch all output of the command as well
// as to avoid clashes of our redirection with the ones
@@ -689,9 +689,9 @@ public:
virtual ReturnCode process(KMMessage* msg) const;
static KMFilterAction* newAction();
- TQWidget * createParamWidget( TQWidget * parent ) const;
- void applyParamWidgetValue( TQWidget * parent );
- void setParamWidgetValue( TQWidget * parent ) const;
+ TQWidget * createParamWidget( TQWidget * tqparent ) const;
+ void applyParamWidgetValue( TQWidget * tqparent );
+ void setParamWidgetValue( TQWidget * tqparent ) const;
void clearParamWidget( TQWidget * param ) const;
};
@@ -712,9 +712,9 @@ KMFilterAction::ReturnCode KMFilterActionIdentity::process(KMMessage* msg) const
return GoOn;
}
-TQWidget * KMFilterActionIdentity::createParamWidget( TQWidget * parent ) const
+TQWidget * KMFilterActionIdentity::createParamWidget( TQWidget * tqparent ) const
{
- KPIM::IdentityCombo * ic = new KPIM::IdentityCombo( kmkernel->identityManager(), parent );
+ KPIM::IdentityCombo * ic = new KPIM::IdentityCombo( kmkernel->identityManager(), tqparent );
ic->setCurrentIdentity( mParameter );
return ic;
}
@@ -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,16 +831,16 @@ 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::null;
+ 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( );
@@ -930,7 +930,7 @@ void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr )
const TQString KMFilterActionFakeDisposition::argsAsString() const
{
int idx = mParameterList.findIndex( mParameter );
- if ( idx < 1 ) return TQString::null;
+ if ( idx < 1 ) return TQString();
return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) );
}
@@ -951,7 +951,7 @@ class KMFilterActionRemoveHeader: public KMFilterActionWithStringList
public:
KMFilterActionRemoveHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual TQWidget* createParamWidget( TQWidget* tqparent ) const;
virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
static KMFilterAction* newAction();
@@ -974,9 +974,9 @@ KMFilterActionRemoveHeader::KMFilterActionRemoveHeader()
mParameter = *mParameterList.at(0);
}
-TQWidget* KMFilterActionRemoveHeader::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionRemoveHeader::createParamWidget( TQWidget* tqparent ) const
{
- TQComboBox *cb = new TQComboBox( true/*editable*/, parent );
+ TQComboBox *cb = new TQComboBox( true/*editable*/, tqparent );
cb->setInsertionPolicy( TQComboBox::AtBottom );
setParamWidgetValue( cb );
return cb;
@@ -1017,7 +1017,7 @@ class KMFilterActionAddHeader: public KMFilterActionWithStringList
public:
KMFilterActionAddHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual TQWidget* createParamWidget( TQWidget* tqparent ) const;
virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
virtual void applyParamWidgetValue( TQWidget* paramWidget );
virtual void clearParamWidget( TQWidget* paramWidget ) const;
@@ -1055,9 +1055,9 @@ KMFilterAction::ReturnCode KMFilterActionAddHeader::process(KMMessage* msg) cons
return GoOn;
}
-TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* tqparent ) const
{
- TQWidget *w = new TQWidget( parent );
+ TQWidget *w = new TQWidget( tqparent );
TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
TQComboBox *cb = new TQComboBox( true, w, "combo" );
@@ -1157,7 +1157,7 @@ class KMFilterActionRewriteHeader: public KMFilterActionWithStringList
public:
KMFilterActionRewriteHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual TQWidget* createParamWidget( TQWidget* tqparent ) const;
virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
virtual void applyParamWidgetValue( TQWidget* paramWidget );
virtual void clearParamWidget( TQWidget* paramWidget ) const;
@@ -1194,7 +1194,7 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg)
if ( mParameter.isEmpty() || !mRegExp.isValid() )
return ErrorButGoOn;
- KRegExp3 rx = mRegExp; // KRegExp3::tqreplace is not const.
+ KRegExp3 rx = mRegExp; // KRegExp3::replace is not const.
TQString newValue = rx.tqreplace( msg->headerField( mParameter.latin1() ),
mReplacementString );
@@ -1203,9 +1203,9 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg)
return GoOn;
}
-TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) const
{
- TQWidget *w = new TQWidget( parent );
+ TQWidget *w = new TQWidget( tqparent );
TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
@@ -1366,7 +1366,7 @@ KMFilterAction::ReturnCode KMFilterActionMove::process(KMMessage* msg) const
bool KMFilterActionMove::requiresBody(KMMsgBase*) const
{
- return false; //iff mFolder->folderMgr == msgBase->parent()->folderMgr;
+ return false; //iff mFolder->folderMgr == msgBase->tqparent()->folderMgr;
}
@@ -1443,7 +1443,7 @@ class KMFilterActionForward: public KMFilterActionWithAddress
public:
KMFilterActionForward();
virtual ReturnCode process( KMMessage* msg ) const;
- virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual TQWidget* createParamWidget( TQWidget* tqparent ) const;
virtual void applyParamWidgetValue( TQWidget* paramWidget );
virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
virtual void clearParamWidget( TQWidget* paramWidget ) const;
@@ -1495,9 +1495,9 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
return GoOn;
}
-TQWidget* KMFilterActionForward::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionForward::createParamWidget( TQWidget* tqparent ) const
{
- TQWidget *addressAndTemplate = new TQWidget( parent );
+ TQWidget *addressAndTemplate = new TQWidget( tqparent );
TQHBoxLayout *hBox = new TQHBoxLayout( addressAndTemplate );
TQWidget *addressEdit = KMFilterActionWithAddress::createParamWidget( addressAndTemplate );
addressEdit->setName( "addressEdit" );
@@ -1540,7 +1540,7 @@ void KMFilterActionForward::applyParamWidgetValue( TQWidget* paramWidget )
if ( templateCombo->currentItem() == 0 ) {
// Default template, so don't use a custom one
- mTemplate = TQString::null;
+ mTemplate = TQString();
}
else {
mTemplate = templateCombo->currentText();
@@ -1573,7 +1573,7 @@ void KMFilterActionForward::setParamWidgetValue( TQWidget* paramWidget ) const
templateCombo->setCurrentItem( templateIndex );
}
else {
- mTemplate = TQString::null;
+ mTemplate = TQString();
}
}
}
@@ -1596,7 +1596,7 @@ static const TQString forwardFilterArgsSeperator = "@$$@";
void KMFilterActionForward::argsFromString( const TQString argsStr )
{
- int seperatorPos = argsStr.find( forwardFilterArgsSeperator );
+ int seperatorPos = argsStr.tqfind( forwardFilterArgsSeperator );
if ( seperatorPos == - 1 ) {
// Old config, assume that the whole string is the addressee
@@ -1699,8 +1699,8 @@ KMFilterAction::ReturnCode KMFilterActionExec::process(KMMessage *aMsg) const
class PipeJob : public KPIM::ThreadWeaver::Job
{
public:
- PipeJob(TQObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, TQString cmd = 0, TQString tempFileName = 0 )
- : Job (parent, name),
+ PipeJob(TQObject* tqparent = 0 , const char* name = 0, KMMessage* aMsg = 0, TQString cmd = 0, TQString tempFileName = 0 )
+ : Job (tqparent, name),
mTempFileName(tempFileName),
mCmd(cmd),
mMsg( aMsg )
@@ -1737,17 +1737,17 @@ class PipeJob : public KPIM::ThreadWeaver::Job
pclose(p);
if ( !ba.isEmpty() ) {
KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", TQString(ba).latin1() );
- KMFolder *filterFolder = mMsg->parent();
+ KMFolder *filterFolder = mMsg->tqparent();
ActionScheduler *handler = MessageProperty::filterHandler( mMsg->getMsgSerNum() );
mMsg->fromByteArray( ba );
if ( !origSerNum.isEmpty() )
mMsg->setHeaderField( "X-KMail-Filtered", origSerNum );
if ( filterFolder && handler ) {
- bool oldStatus = handler->ignoreChanges( true );
- filterFolder->take( filterFolder->find( mMsg ) );
+ bool oldtqStatus = handler->ignoreChanges( true );
+ filterFolder->take( filterFolder->tqfind( mMsg ) );
filterFolder->addMsg( mMsg );
- handler->ignoreChanges( oldStatus );
+ handler->ignoreChanges( oldtqStatus );
} else {
kdDebug(5006) << "Warning: Cannot refresh the message from the external filter." << endl;
}
@@ -1800,7 +1800,7 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const
if ( commandLine.isEmpty() )
handler->actionMessage( ErrorButGoOn );
- // The parentheses force the creation of a subshell
+ // The tqparentheses force the creation of a subshell
// in which the user-specified command is executed.
// This is to really catch all output of the command as well
// as to avoid clashes of our redirection with the ones
@@ -1842,9 +1842,9 @@ KMFilterActionWithTest::~KMFilterActionWithTest()
{
}
-TQWidget* KMFilterActionWithTest::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithTest::createParamWidget( TQWidget* tqparent ) const
{
- KMSoundTestWidget *le = new KMSoundTestWidget(parent);
+ KMSoundTestWidget *le = new KMSoundTestWidget(tqparent);
le->setUrl( mParameter );
return le;
}
@@ -1919,9 +1919,9 @@ KMFilterActionWithUrl::~KMFilterActionWithUrl()
{
}
-TQWidget* KMFilterActionWithUrl::createParamWidget( TQWidget* parent ) const
+TQWidget* KMFilterActionWithUrl::createParamWidget( TQWidget* tqparent ) const
{
- KURLRequester *le = new KURLRequester(parent);
+ KURLRequester *le = new KURLRequester(tqparent);
le->setURL( mParameter );
return le;
}
@@ -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 );