rem: } else if ( rtype == "MonthlyDay" ) {
add: } else if ( rtype == "MonthlyDate" ) {
context:     bool startElement( const QString &, const QString &, const QString & qName,                        const QXmlAttributes &attributes )    {      if ( qName == "event" ) {        Event *event = new Event;        QString uid = "Qtopia" + attributes.value( "uid" );        event->setUid( uid );        event->setSummary( attributes.value( "description" ) );        event->setLocation( attributes.value( "location" ) );        event->setDescription( attributes.value( "note" ) );        event->setDtStart( toDateTime( attributes.value( "start" ) ) );        event->setDtEnd( toDateTime( attributes.value( "end" ) ) );        if ( attributes.value( "type" ) == "AllDay" ) {          event->setFloats( true );        } else {          event->setFloats( false );        }        QString rtype = attributes.value( "rtype" );        if ( !rtype.isEmpty() ) {          QDate startDate = event->dtStart().date();                  QString freqStr = attributes.value( "rfreq" );          int freq = freqStr.toInt();          QString hasEndDateStr = attributes.value( "rhasenddate" );          bool hasEndDate = hasEndDateStr == "1";          QString endDateStr = attributes.value( "enddt" );          QDate endDate = toDateTime( endDateStr ).date();          QString weekDaysStr = attributes.value( "rweekdays" );          int weekDaysNum = weekDaysStr.toInt();          QBitArray weekDays( 7 );          int i;          for( i = 1; i <= 7; ++i ) {            weekDays.setBit( i - 1, ( 2 << i ) & weekDaysNum );           }          QString posStr = attributes.value( "rposition" );          int pos = posStr.toInt();          Recurrence *r = event->recurrence();          if ( rtype == "Daily" ) {            if ( hasEndDate ) r->setDaily( freq, endDate );            else r->setDaily( freq, -1 );          } else if ( rtype == "Weekly" ) {            if ( hasEndDate ) r->setWeekly( freq, weekDays, endDate );            else r->setWeekly( freq, weekDays, -1 );          } else if ( rtype == "MonthlyDay" ) {            if ( hasEndDate )              r->setMonthly( Recurrence::rMonthlyDay, freq, endDate );            else              r->setMonthly( Recurrence::rMonthlyDay, freq, -1 );            r->addMonthlyDay( pos );          } else if ( rtype == "MonthlyDate" ) {            if ( hasEndDate )              r->setMonthly( Recurrence::rMonthlyPos, freq, endDate );            else              r->setMonthly( Recurrence::rMonthlyPos, freq, -1 );            QBitArray days( 7 );            days.fill( false );            days.setBit( startDate.dayOfWeek() - 1 );            r->addMonthlyPos( startDate.day(), days );          } else if ( rtype == "Yearly" ) {            if ( hasEndDate )              r->setYearly( Recurrence::rYearlyMonth, freq, endDate );            else              r->setYearly( Recurrence::rYearlyMonth, freq, -1 );            r->addYearlyNum( startDate.month() );          }        }                Event *oldEvent = mCalendar->event( uid );        if ( oldEvent ) mCalendar->deleteEvent( oldEvent );        mCalendar->addEvent( event );      }            return true;    }