rem: bool KAlarmEvent::setRecurMonthlyByPos(Recurrence& recurrence, int freq, const QPtrList<Recurrence::rMonthPos>& posns, int count, const QDate& end) { if (count < -1) return false; if (count) recurrence.setMonthly(Recurrence::rMonthlyPos, freq, count); else if (end.isValid()) recurrence.setMonthly(Recurrence::rMonthlyPos, freq, end); else return false; for (QPtrListIterator<Recurrence::rMonthPos> it(posns);  it.current();  ++it) { short weekno = it.current()->rPos; if (it.current()->negative) weekno = -weekno; recurrence.addMonthlyPos(weekno, it.current()->rDays); } return true; }
add: void               setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& mp, int count)        { setRecurMonthlyByPos(freq, mp, count, QDate()); }
context: bool KAlarmEvent::setRecurMonthlyByPos(Recurrence& recurrence, int freq, const QPtrList<Recurrence::rMonthPos>& posns, int count, const QDate& end){	if (count < -1)		return false;	if (count)		recurrence.setMonthly(Recurrence::rMonthlyPos, freq, count);	else if (end.isValid())		recurrence.setMonthly(Recurrence::rMonthlyPos, freq, end);	else		return false;	for (QPtrListIterator<Recurrence::rMonthPos> it(posns);  it.current();  ++it)	{		short weekno = it.current()->rPos;		if (it.current()->negative)			weekno = -weekno;		recurrence.addMonthlyPos(weekno, it.current()->rDays);	}	return true;}