-rw-r--r-- | libkcal/incidence.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 9a36939..a312ba5 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -203,96 +203,97 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) if ( i1.hasStartDate() == i2.hasStartDate() ) { if ( i1.hasStartDate() ) { if ( i1.dtStart() != i2.dtStart() ) return false; } } else { return false; } if (!( *i1.recurrence() == *i2.recurrence()) ) { qDebug("recurrence is NOT equal "); return false; } return // i1.created() == i2.created() && stringCompare( i1.description(), i2.description() ) && stringCompare( i1.summary(), i2.summary() ) && i1.categories() == i2.categories() && // no need to compare mRelatedTo stringCompare( i1.relatedToUid(), i2.relatedToUid() ) && // i1.relations() == i2.relations() && i1.exDates() == i2.exDates() && i1.attachments() == i2.attachments() && i1.resources() == i2.resources() && i1.secrecy() == i2.secrecy() && i1.priority() == i2.priority() && i1.cancelled() == i2.cancelled() && stringCompare( i1.location(), i2.location() ); } Incidence* Incidence::recreateCloneException( QDate d ) { Incidence* newInc = clone(); newInc->recreate(); if ( doesRecur() ) { addExDate( d ); newInc->recurrence()->unsetRecurs(); if ( type() == "Event") { int len = dtStart().secsTo( ((Event*)this)->dtEnd()); QTime tim = dtStart().time(); newInc->setDtStart( QDateTime(d, tim) ); ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); } else { int len = dtStart().secsTo( ((Todo*)this)->dtDue()); QTime tim = ((Todo*)this)->dtDue().time(); ((Todo*)newInc)->setDtDue( QDateTime(d, tim) ); ((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) ); ((Todo*)this)->setRecurDates(); } + newInc->setExDates( DateList () ); } return newInc; } void Incidence::recreate() { setCreated(QDateTime::currentDateTime()); setUid(CalFormat::createUniqueId()); setRevision(0); setIDStr( ":" ); setLastModified(QDateTime::currentDateTime()); } void Incidence::setReadOnly( bool readOnly ) { IncidenceBase::setReadOnly( readOnly ); recurrence()->setRecurReadOnly( readOnly); } void Incidence::setCreated(QDateTime created) { if (mReadOnly) return; mCreated = getEvenTime(created); } QDateTime Incidence::created() const { return mCreated; } void Incidence::setRevision(int rev) { if (mReadOnly) return; mRevision = rev; updated(); } int Incidence::revision() const { return mRevision; } void Incidence::setDtStart(const QDateTime &dtStart) { |