summaryrefslogtreecommitdiffstats
path: root/kmail/kmsearchpattern.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kmail/kmsearchpattern.cpp
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmail/kmsearchpattern.cpp')
-rw-r--r--kmail/kmsearchpattern.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp
index 4c4340a2b..1d6fd95d7 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;
- KMMsgtqStatus status;
+ KMMsgStatus status;
};
static struct _statusNames statusNames[] = {
@@ -104,7 +104,7 @@ KMSearchRule * KMSearchRule::createInstance( const TQCString & field,
{
KMSearchRule *ret = 0;
if (field == "<status>")
- ret = new KMSearchRuletqStatus( field, func, contents );
+ ret = new KMSearchRuleStatus( 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::tqcurrentDateTime() );
+ numericalMsgContents = msgDateTime.daysTo( TQDateTime::currentDateTime() );
numericalValue = contents().toInt();
msgContents.setNum( numericalMsgContents );
}
@@ -622,10 +622,10 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue,
//==================================================
//
-// class KMSearchRuletqStatus
+// class KMSearchRuleStatus
//
//==================================================
-TQString englishNameFortqStatus( const KMMsgtqStatus& status )
+TQString englishNameForStatus( const KMMsgStatus& status )
{
for ( int i=0; i< numStatusNames; i++ ) {
if ( statusNames[i].status == status ) {
@@ -635,22 +635,22 @@ TQString englishNameFortqStatus( const KMMsgtqStatus& status )
return TQString();
}
-KMSearchRuletqStatus::KMSearchRuletqStatus( const TQCString & field,
+KMSearchRuleStatus::KMSearchRuleStatus( 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
- mtqStatus = statusFromEnglishName( aContents );
+ mStatus = statusFromEnglishName( aContents );
}
-KMSearchRuletqStatus::KMSearchRuletqStatus( int status, Function func )
-: KMSearchRule( "<status>", func, englishNameFortqStatus( status ) )
+KMSearchRuleStatus::KMSearchRuleStatus( int status, Function func )
+: KMSearchRule( "<status>", func, englishNameForStatus( status ) )
{
- mtqStatus = status;
+ mStatus = status;
}
-KMMsgtqStatus KMSearchRuletqStatus::statusFromEnglishName( const TQString & aStatusString )
+KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const TQString & aStatusString )
{
for ( int i=0; i< numStatusNames; i++ ) {
if ( !aStatusString.compare( statusNames[i].name ) ) {
@@ -660,33 +660,33 @@ KMMsgtqStatus KMSearchRuletqStatus::statusFromEnglishName( const TQString & aSta
return KMMsgStatusUnknown;
}
-bool KMSearchRuletqStatus::isEmpty() const
+bool KMSearchRuleStatus::isEmpty() const
{
return field().stripWhiteSpace().isEmpty() || contents().isEmpty();
}
-bool KMSearchRuletqStatus::matches( const DwString &, KMMessage &,
+bool KMSearchRuleStatus::matches( const DwString &, KMMessage &,
const DwBoyerMoore *, int ) const
{
assert( 0 );
return false; // don't warn
}
-bool KMSearchRuletqStatus::matches( const KMMessage * msg ) const
+bool KMSearchRuleStatus::matches( const KMMessage * msg ) const
{
- KMMsgtqStatus msgtqStatus = msg->status();
+ KMMsgStatus msgStatus = msg->status();
bool rc = false;
switch ( function() ) {
case FuncEquals: // fallthrough. So that "<status> 'is' 'read'" works
case FuncContains:
- if (msgtqStatus & mtqStatus)
+ if (msgStatus & mStatus)
rc = true;
break;
case FuncNotEqual: // fallthrough. So that "<status> 'is not' 'read'" works
case FuncContainsNot:
- if (! (msgtqStatus & mtqStatus) )
+ if (! (msgStatus & mStatus) )
rc = true;
break;
// FIXME what about the remaining funcs, how can they make sense for