diff options
Diffstat (limited to 'kmail/kmsearchpattern.cpp')
-rw-r--r-- | kmail/kmsearchpattern.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp index 1d6fd95d7..4c4340a2b 100644 --- a/kmail/kmsearchpattern.cpp +++ b/kmail/kmsearchpattern.cpp @@ -41,7 +41,7 @@ static const int numFuncConfigNames = sizeof funcConfigNames / sizeof *funcConfi struct _statusNames { const char* name; - KMMsgStatus status; + KMMsgtqStatus status; }; static struct _statusNames statusNames[] = { @@ -104,7 +104,7 @@ KMSearchRule * KMSearchRule::createInstance( const TQCString & field, { KMSearchRule *ret = 0; if (field == "<status>") - ret = new KMSearchRuleStatus( field, func, contents ); + ret = new KMSearchRuletqStatus( field, func, contents ); else if ( field == "<age in days>" || field == "<size>" ) ret = new KMSearchRuleNumerical( field, func, contents ); else @@ -550,7 +550,7 @@ bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const } else if ( field() == "<age in days>" ) { TQDateTime msgDateTime; msgDateTime.setTime_t( msg->date() ); - numericalMsgContents = msgDateTime.daysTo( TQDateTime::currentDateTime() ); + numericalMsgContents = msgDateTime.daysTo( TQDateTime::tqcurrentDateTime() ); numericalValue = contents().toInt(); msgContents.setNum( numericalMsgContents ); } @@ -622,10 +622,10 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, //================================================== // -// class KMSearchRuleStatus +// class KMSearchRuletqStatus // //================================================== -TQString englishNameForStatus( const KMMsgStatus& status ) +TQString englishNameFortqStatus( const KMMsgtqStatus& status ) { for ( int i=0; i< numStatusNames; i++ ) { if ( statusNames[i].status == status ) { @@ -635,22 +635,22 @@ TQString englishNameForStatus( const KMMsgStatus& status ) return TQString(); } -KMSearchRuleStatus::KMSearchRuleStatus( const TQCString & field, +KMSearchRuletqStatus::KMSearchRuletqStatus( const TQCString & field, Function func, const TQString & aContents ) : KMSearchRule(field, func, aContents) { // the values are always in english, both from the conf file as well as // the patternedit gui - mStatus = statusFromEnglishName( aContents ); + mtqStatus = statusFromEnglishName( aContents ); } -KMSearchRuleStatus::KMSearchRuleStatus( int status, Function func ) -: KMSearchRule( "<status>", func, englishNameForStatus( status ) ) +KMSearchRuletqStatus::KMSearchRuletqStatus( int status, Function func ) +: KMSearchRule( "<status>", func, englishNameFortqStatus( status ) ) { - mStatus = status; + mtqStatus = status; } -KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const TQString & aStatusString ) +KMMsgtqStatus KMSearchRuletqStatus::statusFromEnglishName( const TQString & aStatusString ) { for ( int i=0; i< numStatusNames; i++ ) { if ( !aStatusString.compare( statusNames[i].name ) ) { @@ -660,33 +660,33 @@ KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const TQString & aStatusS return KMMsgStatusUnknown; } -bool KMSearchRuleStatus::isEmpty() const +bool KMSearchRuletqStatus::isEmpty() const { return field().stripWhiteSpace().isEmpty() || contents().isEmpty(); } -bool KMSearchRuleStatus::matches( const DwString &, KMMessage &, +bool KMSearchRuletqStatus::matches( const DwString &, KMMessage &, const DwBoyerMoore *, int ) const { assert( 0 ); return false; // don't warn } -bool KMSearchRuleStatus::matches( const KMMessage * msg ) const +bool KMSearchRuletqStatus::matches( const KMMessage * msg ) const { - KMMsgStatus msgStatus = msg->status(); + KMMsgtqStatus msgtqStatus = msg->status(); bool rc = false; switch ( function() ) { case FuncEquals: // fallthrough. So that "<status> 'is' 'read'" works case FuncContains: - if (msgStatus & mStatus) + if (msgtqStatus & mtqStatus) rc = true; break; case FuncNotEqual: // fallthrough. So that "<status> 'is not' 'read'" works case FuncContainsNot: - if (! (msgStatus & mStatus) ) + if (! (msgtqStatus & mtqStatus) ) rc = true; break; // FIXME what about the remaining funcs, how can they make sense for |