summaryrefslogtreecommitdiffstats
path: root/libkcal/recurrence.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /libkcal/recurrence.cpp
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/recurrence.cpp')
-rw-r--r--libkcal/recurrence.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp
index ae47db326..474d885f1 100644
--- a/libkcal/recurrence.cpp
+++ b/libkcal/recurrence.cpp
@@ -112,13 +112,13 @@ bool Recurrence::operator==( const Recurrence& r2 ) const
void Recurrence::addObserver( Observer *observer )
{
- if ( !mObservers.contains( observer ) )
+ if ( !mObservers.tqcontains( observer ) )
mObservers.append( observer );
}
void Recurrence::removeObserver( Observer *observer )
{
- if ( mObservers.contains( observer ) )
+ if ( mObservers.tqcontains( observer ) )
mObservers.remove( observer );
}
@@ -269,7 +269,7 @@ bool Recurrence::recursOn(const TQDate &qd) const
{
TimeList tms;
// First handle dates. Exrules override
- if ( mExDates.contains( qd ) ) return false;
+ if ( mExDates.tqcontains( qd ) ) return false;
// For all-day events a matching exrule excludes the whole day
// since exclusions take precedence over inclusions, we know it can't occur on that day.
if ( doesFloat() ) {
@@ -279,7 +279,7 @@ bool Recurrence::recursOn(const TQDate &qd) const
}
}
- if ( mRDates.contains( qd ) ) return true;
+ if ( mRDates.tqcontains( qd ) ) return true;
bool recurs = false;
@@ -328,14 +328,14 @@ bool Recurrence::recursOn(const TQDate &qd) const
bool Recurrence::recursAt( const TQDateTime &dt ) const
{
// if it's excluded anyway, don't bother to check if it recurs at all.
- if ( mExDateTimes.contains( dt )) return false;
- if ( mExDates.contains( dt.date() )) return false;
+ if ( mExDateTimes.tqcontains( dt )) return false;
+ if ( mExDates.tqcontains( dt.date() )) return false;
for ( RecurrenceRule::List::ConstIterator rr = mExRules.begin(); rr != mExRules.end(); ++rr ) {
if ( (*rr)->recursAt( dt ) ) return false;
}
// Check explicit recurrences, then rrules.
- bool occurs = ( startDateTime() == dt ) || mRDateTimes.contains( dt );
+ bool occurs = ( startDateTime() == dt ) || mRDateTimes.tqcontains( dt );
if ( occurs )
return true;
for ( RecurrenceRule::List::ConstIterator rr = mRRules.begin(); rr != mRRules.end(); ++rr ) {
@@ -624,7 +624,7 @@ void Recurrence::addMonthlyPos( short pos, const TQBitArray &days )
for ( int i = 0; i < 7; ++i ) {
if ( days.testBit(i) ) {
RecurrenceRule::WDayPos p( pos, i + 1 );
- if ( !positions.contains( p ) ) {
+ if ( !positions.tqcontains( p ) ) {
changed = true;
positions.append( p );
}
@@ -646,7 +646,7 @@ void Recurrence::addMonthlyPos( short pos, ushort day )
TQValueList<RecurrenceRule::WDayPos> positions = rrule->byDays();
RecurrenceRule::WDayPos p( pos, day );
- if ( !positions.contains( p ) ) {
+ if ( !positions.tqcontains( p ) ) {
positions.append( p );
rrule->setByDays( positions );
updated();
@@ -661,7 +661,7 @@ void Recurrence::addMonthlyDate( short day )
if ( !rrule ) return;
TQValueList<int> monthDays = rrule->byMonthDays();
- if ( !monthDays.contains( day ) ) {
+ if ( !monthDays.tqcontains( day ) ) {
monthDays.append( day );
rrule->setByMonthDays( monthDays );
updated();
@@ -682,7 +682,7 @@ void Recurrence::addYearlyDay( int day )
if ( !rrule ) return;
TQValueList<int> days = rrule->byYearDays();
- if ( !days.contains( day ) ) {
+ if ( !days.tqcontains( day ) ) {
days << day;
rrule->setByYearDays( days );
updated();
@@ -710,7 +710,7 @@ void Recurrence::addYearlyMonth( short month )
if ( !rrule ) return;
TQValueList<int> months = rrule->byMonths();
- if ( !months.contains(month) ) {
+ if ( !months.tqcontains(month) ) {
months << month;
rrule->setByMonths( months );
updated();
@@ -722,7 +722,7 @@ TimeList Recurrence::recurTimesOn( const TQDate &date ) const
{
TimeList times;
// The whole day is excepted
- if ( mExDates.contains( date ) ) return times;
+ if ( mExDates.tqcontains( date ) ) return times;
// EXRULE takes precedence over RDATE entries, so for floating events,
// a matching excule also excludes the whole day automatically
if ( doesFloat() ) {
@@ -893,8 +893,8 @@ TQDateTime Recurrence::getNextDateTime( const TQDateTime &preDateTime ) const
nextDT = dates.first();
// Check if that date/time is excluded explicitly or by an exrule:
- if ( !containsSorted( mExDates, nextDT.date() ) &&
- !containsSorted( mExDateTimes, nextDT ) ) {
+ if ( !tqcontainsSorted( mExDates, nextDT.date() ) &&
+ !tqcontainsSorted( mExDateTimes, nextDT ) ) {
bool allowed = true;
for ( i = 0, end = mExRules.count(); i < end; ++i ) {
allowed = allowed && !( mExRules[i]->recursAt( nextDT ) );
@@ -964,8 +964,8 @@ TQDateTime Recurrence::getPreviousDateTime( const TQDateTime &afterDateTime ) co
prevDT = dates.last();
// Check if that date/time is excluded explicitly or by an exrule:
- if ( !containsSorted( mExDates, prevDT.date() ) &&
- !containsSorted( mExDateTimes, prevDT ) ) {
+ if ( !tqcontainsSorted( mExDates, prevDT.date() ) &&
+ !tqcontainsSorted( mExDateTimes, prevDT ) ) {
bool allowed = true;
for ( i = 0, end = mExRules.count(); i < end; ++i ) {
allowed = allowed && !( mExRules[i]->recursAt( prevDT ) );