summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformatimpl.cpp
authorzautrix <zautrix>2004-07-10 17:03:16 (UTC)
committer zautrix <zautrix>2004-07-10 17:03:16 (UTC)
commitcf2f3f98a4811668f9e9d0d5f44ea5b51d268cef (patch) (side-by-side diff)
tree963322cd4c539c084feb43dfde5eabe52ae4385f /libkcal/icalformatimpl.cpp
parent8cc6d456812b5a9a386e81c9e46baccd56029537 (diff)
downloadkdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.zip
kdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.tar.gz
kdepimpi-cf2f3f98a4811668f9e9d0d5f44ea5b51d268cef.tar.bz2
Fixed some problems with the recurrence
Diffstat (limited to 'libkcal/icalformatimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/icalformatimpl.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 32a1337..964ffe3 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -1392,7 +1392,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
if ( r.freq == ICAL_YEARLY_RECURRENCE ) {
if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX && r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
frequ = ICAL_MONTHLY_RECURRENCE;
- interv = 12;
+ interv = 12* r.interval;
}
}
@@ -1499,6 +1499,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
break;
case ICAL_YEARLY_RECURRENCE:
if (r.by_year_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
+ qDebug(" YEARLY DAY OF YEAR");
if (!icaltime_is_null_time(r.until)) {
recur->setYearly(Recurrence::rYearlyDay,interv,
readICalDate(r.until));
@@ -1513,6 +1514,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
}
} else if ( true /*r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX*/) {
if (r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
+ qDebug("YEARLY POS NOT SUPPORTED BY GUI");
if (!icaltime_is_null_time(r.until)) {
recur->setYearly(Recurrence::rYearlyPos,interv,
readICalDate(r.until));
@@ -1543,6 +1545,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
}
}
} else {
+ qDebug("YEARLY MONTH ");
if (!icaltime_is_null_time(r.until)) {
recur->setYearly(Recurrence::rYearlyMonth,interv,
readICalDate(r.until));
@@ -1552,15 +1555,16 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
else
recur->setYearly(Recurrence::rYearlyMonth,interv,r.count);
}
- }
- if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
- index = 0;
- while((day = r.by_month[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
- recur->addYearlyNum(day);
+ if ( r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX ) {
+ index = 0;
+ while((day = r.by_month[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
+ recur->addYearlyNum(day);
+ }
+ } else {
+ recur->addYearlyNum(incidence->dtStart().date().month());
}
- } else {
- recur->addYearlyNum(incidence->dtStart().date().month());
}
+
}
break;
default: