summaryrefslogtreecommitdiffabout
path: root/libkcal/incidence.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/incidence.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/incidence.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 549014e..39c14f5 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -60,5 +60,12 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
// 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();