author | zautrix <zautrix> | 2004-07-10 17:03:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-10 17:03:16 (UTC) |
commit | cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef (patch) (side-by-side diff) | |
tree | 963322cd4c539c084feb43dfde5eabe52ae4385f /libkcal | |
parent | 8cc6d456812b5a9a386e81c9e46baccd56029537 (diff) | |
download | kdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.zip kdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.tar.gz kdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.tar.bz2 |
Fixed some problems with the recurrence
-rw-r--r-- | libkcal/icalformatimpl.cpp | 8 | ||||
-rw-r--r-- | libkcal/recurrence.cpp | 17 | ||||
-rw-r--r-- | libkcal/recurrence.h | 6 |
3 files changed, 24 insertions, 7 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 32a1337..964ffe3 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -1394,3 +1394,3 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre frequ = ICAL_MONTHLY_RECURRENCE; - interv = 12; + interv = 12* r.interval; } @@ -1501,2 +1501,3 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre if (r.by_year_day[0] != ICAL_RECURRENCE_ARRAY_MAX) { + qDebug(" YEARLY DAY OF YEAR"); if (!icaltime_is_null_time(r.until)) { @@ -1515,2 +1516,3 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre if (r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) { + qDebug("YEARLY POS NOT SUPPORTED BY GUI"); if (!icaltime_is_null_time(r.until)) { @@ -1545,2 +1547,3 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre } else { + qDebug("YEARLY MONTH "); if (!icaltime_is_null_time(r.until)) { @@ -1554,3 +1557,2 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre } - } if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX ) { @@ -1564,2 +1566,4 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre } + + } break; diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 5fc5d1f..dd74e10 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -656,3 +656,3 @@ void Recurrence::addMonthlyDay(short _rDay) { - if (mRecurReadOnly || recurs != rMonthlyDay + if (mRecurReadOnly || (recurs != rMonthlyDay && recurs != rYearlyMonth) || _rDay == 0 || _rDay > 31 || _rDay < -31) // invalid day number @@ -727,3 +727,16 @@ const QPtrList<int> &Recurrence::yearNums() const } - +void Recurrence::addYearlyMonth(short _rPos ) +{ + if (mRecurReadOnly || recurs != rYearlyMonth) // invalid day/month number + return; + rMonthPos *tmpPos = new rMonthPos; + if ( _rPos > 0) { + tmpPos->rPos = _rPos; + tmpPos->negative = false; + } else { + tmpPos->rPos = -_rPos; // take abs() + tmpPos->negative = true; + } + rMonthPositions.append(tmpPos); +} void Recurrence::addYearlyNum(short _rNum) diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index a0f6d84..b13d14f 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -290,3 +290,3 @@ class Recurrence static Feb29Type setFeb29YearlyTypeDefault() { return mFeb29YearlyDefaultType; } - + void addYearlyMonth(short _rPos ); // added LR /** @@ -296,2 +296,4 @@ class Recurrence QString recurrenceText() const; + bool getYearlyMonthMonths(int day, QValueList<int>&, + QValueList<int> &leaplist) const; @@ -348,4 +350,2 @@ class Recurrence bool getMonthlyDayDays(QValueList<int>&, int daysInMonth) const; - bool getYearlyMonthMonths(int day, QValueList<int>&, - QValueList<int> &leaplist) const; |