-rw-r--r-- | libkcal/incidence.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 549014e..39c14f5 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -57,8 +57,15 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) // Incidence *mRelatedTo; Incidence *mRelatedTo; mRelatedTo = 0; - mRelatedToUid = i.mRelatedToUid; + mRelatedToUid = i.mRelatedToUid; // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; mExDates = i.mExDates; - mAttachments = i.mAttachments; + QPtrListIterator<Attachment> itat( i.mAttachments ); + Attachment *at; + while( (at = itat.current()) ) { + Attachment *a = new Attachment( *at ); + mAttachments.append( a ); + ++itat; + } + mAttachments.setAutoDelete( true ); mResources = i.mResources; mSecrecy = i.mSecrecy; @@ -758,4 +765,5 @@ Recurrence *Incidence::recurrence() mRecurrence = new Recurrence(this); mRecurrence->setRecurStart( dtStart() ); + mRecurrence->setRecurReadOnly( isReadOnly()); //qDebug("creating new recurence "); //abort(); |