From 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:59:50 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12. --- kmail/kmsearchpattern.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kmail/kmsearchpattern.cpp') 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 == "") - ret = new KMSearchRuleStatus( field, func, contents ); + ret = new KMSearchRuletqStatus( field, func, contents ); else if ( field == "" || field == "" ) ret = new KMSearchRuleNumerical( field, func, contents ); else @@ -550,7 +550,7 @@ bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const } else if ( field() == "" ) { 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( "", func, englishNameForStatus( status ) ) +KMSearchRuletqStatus::KMSearchRuletqStatus( int status, Function func ) +: KMSearchRule( "", 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 " 'is' 'read'" works case FuncContains: - if (msgStatus & mStatus) + if (msgtqStatus & mtqStatus) rc = true; break; case FuncNotEqual: // fallthrough. So that " '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 -- cgit v1.2.1