summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koagenda.cpp4
-rw-r--r--korganizer/koagendaitem.cpp2
-rw-r--r--korganizer/koagendaview.cpp2
-rw-r--r--korganizer/kodaymatrix.cpp2
-rw-r--r--korganizer/koeditorrecurrence.cpp172
-rw-r--r--korganizer/koeventviewer.cpp6
-rw-r--r--korganizer/kolistview.cpp4
-rw-r--r--korganizer/komonthview.cpp6
-rw-r--r--korganizer/kotodoeditor.cpp3
-rw-r--r--korganizer/kowhatsnextview.cpp4
-rw-r--r--libkcal/event.cpp1
-rw-r--r--libkcal/icalformatimpl.cpp24
-rw-r--r--libkcal/incidence.cpp63
-rw-r--r--libkcal/incidence.h5
-rw-r--r--libkcal/kincidenceformatter.cpp4
-rw-r--r--libkcal/vcalformat.cpp4
-rw-r--r--libkcal/vcalformat.h2
18 files changed, 175 insertions, 135 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a76f2ed..a9d42f0 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3760,5 +3760,5 @@ void CalendarView::deleteEvent(Event *anEvent)
}
- if (anEvent->recurrence()->doesRecur()) {
+ if (anEvent->doesRecur()) {
QDate itemDate = mViewManager->currentSelectionDate();
int km;
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 0dd5ef5..c738f7e 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -580,5 +580,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
selectItem(mActionItem);
Incidence *incidence = mActionItem->incidence();
- if ( incidence->isReadOnly() /*|| incidence->recurrence()->doesRecur() */) {
+ if ( incidence->isReadOnly() /*|| incidence->doesRecur() */) {
mActionItem = 0;
} else {
@@ -1000,5 +1000,5 @@ void KOAgenda::endItemAction()
placeItem = mActionItem;
}
- if ( placeItem->incidence()->recurrence()->doesRecur() ) {
+ if ( placeItem->incidence()->doesRecur() ) {
Incidence* oldInc = placeItem->incidence();
placeItem->recreateIncidence();
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 303a92a..49ad9b8 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -235,5 +235,5 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
++yOff;
}
- if (mIncidence->recurrence()->doesRecur()) {
+ if (mIncidence->doesRecur()) {
p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, blue );
if ( horLayout )
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index a01323a..04f30bb 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1202,5 +1202,5 @@ void KOAgendaView::fillAgenda()
if (event->doesFloat()) {
- if (event->recurrence()->doesRecur()) {
+ if (event->doesRecur()) {
if (event->isMultiDay() ) {
endX = endX - beginX;// endX is now number of days
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ec1154a..057df0d 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -454,5 +454,5 @@ void KODayMatrix::updateViewTimed()
QDate endDate = mStartDate.addDays( timeSpan );
for( event = events.first(); event; event = events.next() ) { // for event
- ushort recurType = event->recurrence()->doesRecur();
+ ushort recurType = event->doesRecur();
if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) ||
(recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) {
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index de4e4f7..89504db 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -898,8 +898,7 @@ void KOEditorRecurrence::readEvent(Incidence *event)
setDateTimes( event->dtStart(), dtEnd );
- Recurrence *r = event->recurrence();
- int f = r->frequency();
+
- int recurs = r->doesRecur();
+ int recurs = event->doesRecur();
mEnabledCheck->setChecked( recurs );
@@ -907,83 +906,85 @@ void KOEditorRecurrence::readEvent(Incidence *event)
int recurrenceType = RecurrenceChooser::Weekly;
-
- switch ( recurs ) {
- case Recurrence::rNone:
- setDefaults( event->dtStart(), dtEnd );
- break;
- case Recurrence::rDaily:
- recurrenceType = RecurrenceChooser::Daily;
- mDaily->setFrequency( f );
- break;
- case Recurrence::rWeekly:
- recurrenceType = RecurrenceChooser::Weekly;
- mWeekly->setFrequency( f );
- mWeekly->setDays( r->days() );
- break;
- case Recurrence::rMonthlyPos:
- // we only handle one possibility in the list right now,
- // so I have hardcoded calls with first(). If we make the GUI
- // more extended, this can be changed.
- recurrenceType = RecurrenceChooser::Monthly;
-
- rmp = r->monthPositions();
- if ( rmp.first()->negative )
- count = 5 - rmp.first()->rPos - 1;
- else
- count = rmp.first()->rPos - 1;
- day = 0;
- while ( !rmp.first()->rDays.testBit( day ) ) ++day;
- mMonthly->setByPos( count, day );
-
- mMonthly->setFrequency( f );
-
- break;
- case Recurrence::rMonthlyDay:
- recurrenceType = RecurrenceChooser::Monthly;
-
- rmd = r->monthDays();
- day = *rmd.first() - 1;
- mMonthly->setByDay( day );
-
- mMonthly->setFrequency( f );
-
- break;
- case Recurrence::rYearlyMonth:
- {
- recurrenceType = RecurrenceChooser::Yearly;
- //qDebug("Recurrence::rYearlyMonth: ");
- day = event->dtStart().date().day();
- rmd = r->yearNums();
- if ( rmd.count() > 0 )
- month = *rmd.first();
- else
- month = event->dtStart().date().month() ;
- mYearly->setByMonth( month, day );
+ if ( recurs ) {
+ Recurrence *r = event->recurrence();
+ int f = r->frequency();
+ switch ( recurs ) {
+ case Recurrence::rNone:
+ setDefaults( event->dtStart(), dtEnd );
+ break;
+ case Recurrence::rDaily:
+ recurrenceType = RecurrenceChooser::Daily;
+ mDaily->setFrequency( f );
+ break;
+ case Recurrence::rWeekly:
+ recurrenceType = RecurrenceChooser::Weekly;
+ mWeekly->setFrequency( f );
+ mWeekly->setDays( r->days() );
+ break;
+ case Recurrence::rMonthlyPos:
+ // we only handle one possibility in the list right now,
+ // so I have hardcoded calls with first(). If we make the GUI
+ // more extended, this can be changed.
+ recurrenceType = RecurrenceChooser::Monthly;
+
+ rmp = r->monthPositions();
+ if ( rmp.first()->negative )
+ count = 5 - rmp.first()->rPos - 1;
+ else
+ count = rmp.first()->rPos - 1;
+ day = 0;
+ while ( !rmp.first()->rDays.testBit( day ) ) ++day;
+ mMonthly->setByPos( count, day );
+
+ mMonthly->setFrequency( f );
+
+ break;
+ case Recurrence::rMonthlyDay:
+ recurrenceType = RecurrenceChooser::Monthly;
+
+ rmd = r->monthDays();
+ day = *rmd.first() - 1;
+ mMonthly->setByDay( day );
+
+ mMonthly->setFrequency( f );
+
+ break;
+ case Recurrence::rYearlyMonth:
+ {
+ recurrenceType = RecurrenceChooser::Yearly;
+ //qDebug("Recurrence::rYearlyMonth: ");
+ day = event->dtStart().date().day();
+ rmd = r->yearNums();
+ if ( rmd.count() > 0 )
+ month = *rmd.first();
+ else
+ month = event->dtStart().date().month() ;
+ mYearly->setByMonth( month, day );
#if 0
- //qDebug("2day = %d ",day );
- QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
- int month;
- if ( !monthlist.isEmpty() ) {
- month = monthlist.first()->rPos ;
- } else {
- month = event->dtStart().date().month() ;
- }
- mYearly->setByMonth( day, month );
+ //qDebug("2day = %d ",day );
+ QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
+ int month;
+ if ( !monthlist.isEmpty() ) {
+ month = monthlist.first()->rPos ;
+ } else {
+ month = event->dtStart().date().month() ;
+ }
+ mYearly->setByMonth( day, month );
#endif
- mYearly->setFrequency( f );
- }
+ mYearly->setFrequency( f );
+ }
- break;
- case Recurrence::rYearlyDay:
- //qDebug("Recurrence::rYearlyDay: ");
- recurrenceType = RecurrenceChooser::Yearly;
- mYearly->setByDay( event->dtStart().date().dayOfYear() );
- mYearly->setFrequency( f );
- break;
- default:
- setDefaults( event->dtStart(), dtEnd );
- break;
+ break;
+ case Recurrence::rYearlyDay:
+ //qDebug("Recurrence::rYearlyDay: ");
+ recurrenceType = RecurrenceChooser::Yearly;
+ mYearly->setByDay( event->dtStart().date().dayOfYear() );
+ mYearly->setFrequency( f );
+ break;
+ default:
+ setDefaults( event->dtStart(), dtEnd );
+ break;
+ }
}
-
mRecurrenceChooser->setType( recurrenceType );
showCurrentRule( recurrenceType );
@@ -991,5 +992,6 @@ void KOEditorRecurrence::readEvent(Incidence *event)
mRecurrenceRange->setDateTimes( event->dtStart() );
- if ( r->doesRecur() ) {
+ if ( event->doesRecur() ) {
+ Recurrence *r = event->recurrence();
mRecurrenceRange->setDuration( r->duration() );
if ( r->duration() == 0 )
@@ -1008,10 +1010,14 @@ void KOEditorRecurrence::readEvent(Incidence *event)
void KOEditorRecurrence::writeEvent( Incidence *event )
{
- Recurrence *r = event->recurrence();
+
- // clear out any old settings;
- r->unsetRecurs();
+ if ( !mEnabledCheck->isChecked() ) {
+ if ( event->doesRecur() )
+ event->recurrence()->unsetRecurs();
+ } else {
+ Recurrence *r = event->recurrence();
- if ( mEnabledCheck->isChecked() ) {
+ // clear out any old settings;
+ r->unsetRecurs();
int duration = mRecurrenceRange->duration();
QDate endDate;
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index a690ab1..db695f5 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -348,7 +348,7 @@ void KOEventViewer::appendEvent(Event *event, int mode )
mMailSubject += i18n(" at ") + event->location();
}
- if (event->recurrence()->doesRecur()) {
+ if (event->doesRecur()) {
- QString recurText = event->recurrence()->recurrenceText();
+ QString recurText = event->recurrenceText();
addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>");
bool ok;
@@ -482,5 +482,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
- if (event->recurrence()->doesRecur()) {
+ if (event->doesRecur()) {
QString recurText = event->recurrence()->recurrenceText();
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d25f671..e7a5e0e 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -134,5 +134,5 @@ bool ListItemVisitor::visit(Event *e)
mItem->setText(5, i18n("No"));
}
- mItem->setText(6, e->recurrence()->recurrenceText());
+ mItem->setText(6, e->recurrenceText());
if( ! e->doesRecur() )
mItem->setSortKey( 6, "-" );
@@ -185,5 +185,5 @@ bool ListItemVisitor::visit(Todo *t)
mItem->setText(5, i18n("No"));
}
- mItem->setText(6, t->recurrence()->recurrenceText());
+ mItem->setText(6, t->recurrenceText());
if( ! t->doesRecur() )
mItem->setSortKey( 6, "-" );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 498d9b0..eea9a4d 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -788,5 +788,5 @@ int MonthViewCell::insertEvent(Event *event)
pal.setColor(QColorGroup::Highlight, KOPrefs::instance()->mHighlightColor);
item->setPalette( pal );
- item->setRecur( event->recurrence()->doesRecur() );
+ item->setRecur( event->doesRecur() );
item->setAlarm( event->isAlarmEnabled() && multiday < 2 && event->alarmEnabled() );
item->setMoreInfo( event->description().length() > 0 );
@@ -879,5 +879,5 @@ void MonthViewCell::insertTodo(Todo *todo)
pal.setColor(QColorGroup::Highlight, KOPrefs::instance()->mHighlightColor);
item->setPalette( pal );
- item->setRecur( todo->recurrence()->doesRecur() );
+ item->setRecur( todo->doesRecur() );
item->setAlarm( todo->isAlarmEnabled() && todo->alarmEnabled() );
item->setMoreInfo( todo->description().length() > 0 );
@@ -1106,4 +1106,6 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
return;
}
+ //selection( item );
+ //qApp->processEvents();
MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
Incidence *incidence = eventItem->incidence();
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 100a81b..682f83b 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -378,5 +378,6 @@ void KOTodoEditor::writeTodo(Todo *event)
} else {
event->setHasRecurrenceID( false );
- event->recurrence()->unsetRecurs();
+ if ( event->doesRecur() )
+ event->recurrence()->unsetRecurs();
}
}
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index fafcb58..f88403c 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -508,5 +508,5 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
Event *event = static_cast<Event *>(ev);
QDateTime st,end;
- if ( event->recurrence()->doesRecur() ) {
+ if ( event->doesRecur() ) {
QDate recDate= mEventDate;
int days = event->dtStart().date().daysTo (event->dtEnd().date() );
@@ -623,5 +623,5 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
needClose =true;
}
- if ( ev->recurrence()->doesRecur() ) {
+ if ( ev->doesRecur() ) {
if ( !needClose)
tempText +="[";
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index ad66639..0766fd9 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -174,4 +174,5 @@ void Event::setDuration(int seconds)
bool Event::matchTime(QDateTime*startDT, QDateTime* endDT)
{
+ if ( cancelled() ) return false;
if ( ! doesRecur() ) {
if ( doesFloat() ) {
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 4794bc9..f349681 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -373,16 +373,13 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
// recurrence rule stuff
- Recurrence *recur = incidence->recurrence();
- if (recur->doesRecur()) {
-
- icalcomponent_add_property(parent,writeRecurrenceRule(recur));
- }
-
- // recurrence excpetion dates
- DateList dateList = incidence->exDates();
- DateList::ConstIterator exIt;
- for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) {
- icalcomponent_add_property(parent,icalproperty_new_exdate(
- writeICalDate(*exIt)));
+ if (incidence->doesRecur()) {
+ icalcomponent_add_property(parent,writeRecurrenceRule(incidence->recurrence()));
+ // recurrence excpetion dates
+ DateList dateList = incidence->exDates();
+ DateList::ConstIterator exIt;
+ for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) {
+ icalcomponent_add_property(parent,icalproperty_new_exdate(
+ writeICalDate(*exIt)));
+ }
}
@@ -1296,5 +1293,6 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence)
// Cancel backwards compatibility mode for subsequent changes by the application
- incidence->recurrence()->setCompatVersion();
+ if ( readrec )
+ incidence->recurrence()->setCompatVersion();
// add categories
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index e4bcc5e..4643a3a 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -34,5 +34,5 @@ Incidence::Incidence() :
mRelatedTo(0), mSecrecy(SecrecyPublic), mPriority(3)
{
- mRecurrence = new Recurrence(this);
+ mRecurrence = 0;//new Recurrence(this);
mCancelled = false;
recreate();
@@ -79,5 +79,8 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
mHasRecurrenceID = i.mHasRecurrenceID;
mRecurrenceID = i.mRecurrenceID;
- mRecurrence = new Recurrence( *(i.mRecurrence), this );
+ if ( i.mRecurrence )
+ mRecurrence = new Recurrence( *(i.mRecurrence), this );
+ else
+ mRecurrence = 0;
mHoliday = i.mHoliday ;
mBirthday = i.mBirthday;
@@ -94,5 +97,6 @@ Incidence::~Incidence()
}
if (relatedTo()) relatedTo()->removeRelation(this);
- delete mRecurrence;
+ if ( mRecurrence )
+ delete mRecurrence;
}
@@ -209,8 +213,22 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
return false;
}
- if (!( *i1.recurrence() == *i2.recurrence()) ) {
- qDebug("recurrence is NOT equal ");
- return false;
+ if ( i1.mRecurrence != 0 && i2.mRecurrence != 0 ) {
+ if (!( *i1.mRecurrence == *i2.mRecurrence) ) {
+ //qDebug("recurrence is NOT equal ");
+ return false;
+ }
+ } else {
+ // one ( or both ) recurrence is 0
+ if ( i1.mRecurrence == 0 ) {
+ if ( i2.mRecurrence != 0 && i2.mRecurrence->doesRecur() != Recurrence::rNone )
+ return false;
+ } else {
+ // i1.mRecurrence != 0
+ // i2.mRecurrence == 0
+ if ( i1.mRecurrence->doesRecur() != Recurrence::rNone )
+ return false;
+ }
}
+
return
// i1.created() == i2.created() &&
@@ -280,5 +298,6 @@ void Incidence::setReadOnly( bool readOnly )
{
IncidenceBase::setReadOnly( readOnly );
- recurrence()->setRecurReadOnly( readOnly);
+ if ( mRecurrence )
+ mRecurrence->setRecurReadOnly( readOnly);
}
void Incidence::setLastModifiedSubInvalid()
@@ -331,5 +350,7 @@ void Incidence::setDtStart(const QDateTime &dtStart)
QDateTime dt = getEvenTime(dtStart);
- recurrence()->setRecurStart( dt);
+
+ if ( mRecurrence )
+ mRecurrence->setRecurStart( dt);
IncidenceBase::setDtStart( dt );
}
@@ -505,5 +526,5 @@ void Incidence::removeRelation(Incidence *event)
bool Incidence::recursOn(const QDate &qd) const
{
- if (recurrence()->recursOnPure(qd) && !isException(qd)) return true;
+ if (mRecurrence && mRecurrence->recursOnPure(qd) && !isException(qd)) return true;
else return false;
}
@@ -513,5 +534,4 @@ void Incidence::setExDates(const DateList &exDates)
if (mReadOnly) return;
mExDates = exDates;
-
recurrence()->setRecurExDatesCount(mExDates.count());
@@ -699,13 +719,19 @@ bool Incidence::isAlarmEnabled() const
return false;
}
-
-Recurrence *Incidence::recurrence() const
+#include <stdlib.h>
+Recurrence *Incidence::recurrence()
{
+ if ( ! mRecurrence ) {
+ mRecurrence = new Recurrence(this);
+ qDebug("creating new recurence ");
+ //abort();
+ }
return mRecurrence;
}
void Incidence::setRecurrence( Recurrence * r)
{
- delete mRecurrence;
- mRecurrence = r;
+ if ( mRecurrence )
+ delete mRecurrence;
+ mRecurrence = r;
}
@@ -721,4 +747,9 @@ QString Incidence::location() const
return mLocation;
}
+QString Incidence::recurrenceText() const
+{
+ if ( mRecurrence ) return mRecurrence->recurrenceText();
+ return i18n("No");
+}
ushort Incidence::doesRecur() const
@@ -734,10 +765,10 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
if ( doesRecur() ) {
bool last;
- recurrence()->getPreviousDateTime( incidenceStart , &last );
+ mRecurrence->getPreviousDateTime( incidenceStart , &last );
int count = 0;
if ( !last ) {
while ( !last ) {
++count;
- incidenceStart = recurrence()->getNextDateTime( incidenceStart, &last );
+ incidenceStart = mRecurrence->getNextDateTime( incidenceStart, &last );
if ( recursOn( incidenceStart.date() ) ) {
last = true; // exit while llop
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index d4af9f0..8519f01 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -250,5 +250,5 @@ class Incidence : public IncidenceBase
none, returns an appropriate (non-0) object.
*/
- Recurrence *recurrence() const;
+ Recurrence *recurrence();
void setRecurrence(Recurrence * r);
/**
@@ -279,7 +279,9 @@ class Incidence : public IncidenceBase
bool isAnniversary() const;
QDateTime lastModifiedSub();
+ QString recurrenceText() const;
void setLastModifiedSubInvalid();
+ Recurrence *mRecurrence;
protected:
QPtrList<Alarm> mAlarms;
@@ -310,5 +312,4 @@ protected:
//QPtrList<Alarm> mAlarms;
- Recurrence *mRecurrence;
QString mLocation;
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 9359fad..f8f40f1 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -106,5 +106,5 @@ void KIncidenceFormatter::setEvent(Event *event)
}
- if (event->recurrence()->doesRecur()) {
+ if (event->doesRecur()) {
QString recurText = event->recurrence()->recurrenceText();
@@ -217,5 +217,5 @@ void KIncidenceFormatter::setTodo(Todo *event )
- if (event->recurrence()->doesRecur()) {
+ if (event->doesRecur()) {
QString recurText = event->recurrence()->recurrenceText();
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 8efc1ea..2e19740 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -393,5 +393,5 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
}
-VObject* VCalFormat::eventToVEvent(const Event *anEvent)
+VObject* VCalFormat::eventToVEvent(Event *anEvent)
{
VObject *vevent;
@@ -460,5 +460,5 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
// recurrence rule stuff
- if (anEvent->recurrence()->doesRecur()) {
+ if (anEvent->doesRecur()) {
// some more variables
QPtrList<Recurrence::rMonthPos> tmpPositions;
diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h
index c7df017..6dae3d2 100644
--- a/libkcal/vcalformat.h
+++ b/libkcal/vcalformat.h
@@ -75,5 +75,5 @@ class VCalFormat : public CalFormat {
VObject *eventToVTodo(const Todo *anEvent);
/** translate a Event into a VObject and returns a pointer to it. */
- VObject* eventToVEvent(const Event *anEvent);
+ VObject* eventToVEvent(Event *anEvent);
/** takes a QDate and returns a string in the format YYYYMMDDTHHMMSS */