summaryrefslogtreecommitdiffstats
path: root/kmail/kmsearchpattern.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:34:45 -0600
committerSlávek Banko <slavek.banko@axis.cz>2012-06-03 04:24:29 +0200
commite3649f744289c180537d2d8474dc0e39050e654f (patch)
tree5d3d773985c0bfdfed5e0aed35fe8b2441d60787 /kmail/kmsearchpattern.cpp
parent4b4a3f32d8e71d79626206211ee6e23ee1e968b8 (diff)
downloadtdepim-e3649f744289c180537d2d8474dc0e39050e654f.tar.gz
tdepim-e3649f744289c180537d2d8474dc0e39050e654f.zip
Rename old tq methods that no longer need a unique name
(cherry picked from commit 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78)
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