-rw-r--r-- | libkcal/recurrence.cpp | 187 |
1 files changed, 95 insertions, 92 deletions
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 6ee5499..9a4e540 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -31,2 +31,5 @@ #include "recurrence.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -58,3 +61,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) rWeekStart(r.rWeekStart), - rDays(r.rDays.copy()), + rDays(r.rDays), rFreq(r.rFreq), @@ -72,3 +75,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) { - for (QPtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { + for (Q3PtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { rMonthPos *tmp = new rMonthPos; @@ -76,6 +79,6 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) tmp->negative = mp.current()->negative; - tmp->rDays = mp.current()->rDays.copy(); + tmp->rDays = mp.current()->rDays; rMonthPositions.append(tmp); } - for (QPtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { + for (Q3PtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { int *tmp = new int; @@ -84,3 +87,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) } - for (QPtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { + for (Q3PtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { int *tmp = new int; @@ -126,4 +129,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyPos: { - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -135,4 +138,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyDay: { - QPtrList<int> MonthDays = rMonthDays ; - QPtrList<int> MonthDays2 = r2.rMonthDays ; + Q3PtrList<int> MonthDays = rMonthDays ; + Q3PtrList<int> MonthDays2 = r2.rMonthDays ; if ( !MonthDays.count() ) @@ -145,8 +148,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; if ( *YearNums.first() != *YearNums2.first() ) return false; - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -159,4 +162,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyMonth: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType); @@ -164,4 +167,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyDay: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() ); @@ -359,3 +362,3 @@ QDateTime Recurrence::endDateTime() const case rDaily: - return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); + return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); @@ -508,3 +511,3 @@ const QBitArray &Recurrence::days() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const { @@ -513,3 +516,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const { @@ -518,3 +521,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const -const QPtrList<int> &Recurrence::monthDays() const +const Q3PtrList<int> &Recurrence::monthDays() const { @@ -761,3 +764,3 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays) -const QPtrList<int> &Recurrence::yearNums() const +const Q3PtrList<int> &Recurrence::yearNums() const { @@ -1049,3 +1052,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const // The date queried falls within the range of the event. - QValueList<int> days; + Q3ValueList<int> days; int daysInMonth = qd.daysInMonth(); @@ -1055,3 +1058,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1103,3 +1106,3 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const int i = qmonth; - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1129,8 +1132,8 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const // The date queried falls within the range of the event. - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (month == *qlin.current()) { // The month recurs - QValueList<int> days; + Q3ValueList<int> days; getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1159,3 +1162,3 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const int i = qd.dayOfYear(); - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1551,3 +1554,3 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const if (count == 0) - endtime = QDate(); + endtime = QDateTime(); else if (timed) @@ -1795,4 +1798,4 @@ struct Recurrence::MonthlyData { private: - QValueList<int> days28, days29, days30, days31; // recurring days in months of each length - QValueList<int> *recurDays[4]; + Q3ValueList<int> days28, days29, days30, days31; // recurring days in months of each length + Q3ValueList<int> *recurDays[4]; public: @@ -1807,3 +1810,3 @@ struct Recurrence::MonthlyData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { if (!varies) @@ -1812,3 +1815,3 @@ struct Recurrence::MonthlyData { int daysInMonth = startOfMonth.daysInMonth(); - QValueList<int>* days = recurDays[daysInMonth - 28]; + Q3ValueList<int>* days = recurDays[daysInMonth - 28]; if (recurrence->recurs == rMonthlyPos) @@ -1846,4 +1849,4 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1912,4 +1915,4 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1971,4 +1974,4 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + enddate.month() - 1; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -2054,4 +2057,4 @@ struct Recurrence::YearlyMonthData { private: - QValueList<int> months; // recurring months in non-leap years 1..12 - QValueList<int> leapMonths; // recurring months in leap years 1..12 + Q3ValueList<int> months; // recurring months in non-leap years 1..12 + Q3ValueList<int> leapMonths; // recurring months in leap years 1..12 public: @@ -2062,5 +2065,5 @@ struct Recurrence::YearlyMonthData { } - const QValueList<int>* monthList() const + const Q3ValueList<int>* monthList() const { return leapyear ? &leapMonths : &months; } - const QValueList<int>* leapMonthList() const { return &leapMonths; } + const Q3ValueList<int>* leapMonthList() const { return &leapMonths; } QDate date() const { return QDate(year, month, day); } @@ -2090,4 +2093,4 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); // get recurring months for this year + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); // get recurring months for this year @@ -2201,4 +2204,4 @@ int Recurrence::yearlyMonthCalcToDate(const QDate &enddate, YearlyMonthData &dat } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2272,4 +2275,4 @@ int Recurrence::yearlyMonthCalcNextAfter(QDate &enddate, YearlyMonthData &data) } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2392,3 +2395,3 @@ struct Recurrence::YearlyPosData { private: - mutable QValueList<int> days; + mutable Q3ValueList<int> days; public: @@ -2400,3 +2403,3 @@ struct Recurrence::YearlyPosData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { QDate startOfMonth(year, month, 1); @@ -2430,4 +2433,4 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const int countGone = 0; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2435,3 +2438,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2468,3 +2471,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2498,3 +2501,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (static_cast<uint>(data.daysPerMonth) >= countTogo) { @@ -2533,4 +2536,4 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2538,3 +2541,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2578,3 +2581,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2613,3 +2616,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2648,4 +2651,4 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2655,3 +2658,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the next year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2691,3 +2694,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2736,3 +2739,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2810,3 +2813,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2848,3 +2851,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2871,3 +2874,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2910,3 +2913,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { if (*it.current() > endDay) @@ -2930,3 +2933,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2979,3 +2982,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2997,3 +3000,3 @@ ex: // startDayOfWeek = day of week for first day of month. -void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int startDayOfWeek) const +void Recurrence::getMonthlyPosDays(Q3ValueList<int> &list, int daysInMonth, int startDayOfWeek) const { @@ -3003,3 +3006,3 @@ void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int s Q_UINT32 days = 0; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos - 1; // get 0-based week number @@ -3041,3 +3044,3 @@ int Recurrence::countMonthlyPosDays() const Q_UINT8 negative[4] = { 0, 0, 0, 0 }; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos; @@ -3074,3 +3077,3 @@ int Recurrence::countMonthlyPosDays() const // Reply = true if day numbers varies from month to month. -bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const +bool Recurrence::getMonthlyDayDays(Q3ValueList<int> &list, int daysInMonth) const { @@ -3079,3 +3082,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const Q_UINT32 days = 0; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3108,3 +3111,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const // Reply = true if February 29th also recurs. -bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList<int> &leaplist) const +bool Recurrence::getYearlyMonthMonths(int day, Q3ValueList<int> &list, Q3ValueList<int> &leaplist) const { @@ -3113,3 +3116,3 @@ bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList bool feb29 = false; - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int month = *it.current(); @@ -3189,3 +3192,3 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const int minday = daysInMonth + 1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3203,5 +3206,5 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const QDate monthBegin(earliestDate.addDays(1 - earliestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3226,3 +3229,3 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const int maxday = -1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3240,5 +3243,5 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const QDate monthBegin(latestDate.addDays(1 - latestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) @@ -3258,3 +3261,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3294,3 +3297,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int earliestYear = earliestDate.year(); @@ -3303,3 +3306,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3331,3 +3334,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3366,3 +3369,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int latestYear = latestDate.year(); @@ -3375,3 +3378,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) |