I think the COUNT=-1 might be introduced in QOrganizerEDSEngine::parseRecurrence() when it populates a struct icalrecurrencetype from a QOrganizerItem.
Note that last line, where rule->count gets assigned directly from qRule.limitCount().
EDS's e_cal_recur_obtain_enddate() states "If neither COUNT or UNTIL is set, the event recurs forever.", so an icalrecurrencetype.count of 0 implies an unbounded alarm.
QOrganizer's semantics differ: qRule.limitCount() returns ''the count condition specified by the recurrence rule. The default count is -1 (ie. * unlimited)''
So qtorganizer5-eds needs to translate QOrganizer's magic-unlimited-number (-1) to EDS's magic-unlimited-number (0).
NB: the reverse bug also happens in QOrganizerEDSEngine::parseRecurrence():
if (icaltime_is_date(rule->until)) { QDate dt = QDate::fromString(icaltime_as_ical_string(rule->until), "yyyyMMdd");
if (dt.isValid()) { qRule.setLimit(dt);
}
} else { qRule.setLimit(rule->count);
}
I think the COUNT=-1 might be introduced in QOrganizerEDSEn gine::parseRecu rrence( ) when it populates a struct icalrecurrencetype from a QOrganizerItem.
if (qRule. limitDate( ).isValid( )) {
rule- >until = icaltime_ from_timet( QDateTime( qRule.limitDate ()).toTime_ t(), TRUE);
rule- >count = ICAL_RECURRENCE _ARRAY_ MAX;
rule- >count = qRule.limitCount();
} else {
}
Note that last line, where rule->count gets assigned directly from qRule.limitCount().
EDS's e_cal_recur_ obtain_ enddate( ) states "If neither COUNT or UNTIL is set, the event recurs forever.", so an icalrecurrencet ype.count of 0 implies an unbounded alarm.
QOrganizer's semantics differ: qRule.limitCount() returns ''the count condition specified by the recurrence rule. The default count is -1 (ie. * unlimited)''
So qtorganizer5-eds needs to translate QOrganizer's magic-unlimited -number (-1) to EDS's magic-unlimited -number (0).
NB: the reverse bug also happens in QOrganizerEDSEn gine::parseRecu rrence( ):
if (icaltime_ is_date( rule->until) ) {
QDate dt = QDate:: fromString( icaltime_ as_ical_ string( rule->until) , "yyyyMMdd");
qRule. setLimit( dt);
qRule. setLimit( rule->count) ;
if (dt.isValid()) {
}
} else {
}