summaryrefslogtreecommitdiffstats
path: root/libkcal/recurrencerule.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libkcal/recurrencerule.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/recurrencerule.cpp')
-rw-r--r--libkcal/recurrencerule.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libkcal/recurrencerule.cpp b/libkcal/recurrencerule.cpp
index e225edb0..733e3f5e 100644
--- a/libkcal/recurrencerule.cpp
+++ b/libkcal/recurrencerule.cpp
@@ -35,10 +35,10 @@ using namespace KCal;
// Maximum number of intervals to process
const int LOOP_LIMIT = 10000;
-// FIXME: If Qt is ever changed so that TQDateTime:::addSecs takes into account
+// FIXME: If TQt is ever changed so that TQDateTime:::addSecs takes into account
// DST shifts, we need to use our own addSecs method, too, since we
// need to caalculate things in UTC!
-/** Workaround for broken TQDateTime::secsTo (at least in Qt 3.3). While
+/** Workaround for broken TQDateTime::secsTo (at least in TQt 3.3). While
TQDateTime::secsTo does take time zones into account, TQDateTime::addSecs
does not, so we have a problem:
TQDateTime d1(TQDate(2005, 10, 30), TQTime(1, 30, 0) );
@@ -104,7 +104,7 @@ TQDate DateHelper::getNthWeek( int year, int weeknumber, short weekstart )
{
if ( weeknumber == 0 ) return TQDate();
// Adjust this to the first day of week #1 of the year and add 7*weekno days.
- TQDate dt( year, 1, 4 ); // Week #1 is the week that tqcontains Jan 4
+ TQDate dt( year, 1, 4 ); // Week #1 is the week that contains Jan 4
int adjust = -(7 + dt.dayOfWeek() - weekstart) % 7;
if ( weeknumber > 0 ) {
dt = dt.addDays( 7 * (weeknumber-1) + adjust );
@@ -418,7 +418,7 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
bool RecurrenceRule::Constraint::increase( RecurrenceRule::PeriodType type, int freq )
{
- // convert the first day of the interval to QDateTime
+ // convert the first day of the interval to TQDateTime
// Sub-daily types need to be converted to UTC to correctly handle DST shifts
TQDateTime dt( intervalDateTime( type ) );
@@ -1299,7 +1299,7 @@ DateTimeList RecurrenceRule::timesInInterval( const TQDateTime &dtStart,
if ( dt < enddt ) {
n = static_cast<int>( ( dt.secsTo( enddt ) - 1 ) / mTimedRepetition ) + 1;
// limit n by a sane value else we can "explode".
- n = QMIN( n, LOOP_LIMIT );
+ n = TQMIN( n, LOOP_LIMIT );
for ( int i = 0; i < n; dt = dt.addSecs( mTimedRepetition ), ++i ) {
result += dt;
}
@@ -1453,7 +1453,7 @@ RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const TQDat
case rMinutely: modifier *= 60;
case rSecondly:
periods = ownSecsTo( start, toDate ) / modifier;
- periods = QMAX( 0, periods);
+ periods = TQMAX( 0, periods);
if ( periods > 0 )
periods += ( frequency() - 1 - ( (periods - 1) % frequency() ) );
nextValid = start.addSecs( modifier * periods );
@@ -1466,7 +1466,7 @@ RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const TQDat
modifier *= 7;
case rDaily:
periods = start.daysTo( toDate ) / modifier;
- periods = QMAX( 0, periods);
+ periods = TQMAX( 0, periods);
if ( periods > 0 )
periods += (frequency() - 1 - ( (periods - 1) % frequency() ) );
nextValid = start.addDays( modifier * periods );
@@ -1475,7 +1475,7 @@ RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const TQDat
case rMonthly: {
periods = 12*( toDate.date().year() - start.date().year() ) +
( toDate.date().month() - start.date().month() );
- periods = QMAX( 0, periods);
+ periods = TQMAX( 0, periods);
if ( periods > 0 )
periods += (frequency() - 1 - ( (periods - 1) % frequency() ) );
// set the day to the first day of the month, so we don't have problems
@@ -1485,7 +1485,7 @@ RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const TQDat
break; }
case rYearly:
periods = ( toDate.date().year() - start.date().year() );
- periods = QMAX( 0, periods);
+ periods = TQMAX( 0, periods);
if ( periods > 0 )
periods += ( frequency() - 1 - ( (periods - 1) % frequency() ) );
nextValid.setDate( start.date().addYears( periods ) );