author | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-10 08:53:14 (UTC) |
commit | 79b12b680f6a0653bcff84c8ef83b23803246b7d (patch) (side-by-side diff) | |
tree | 05e4c6d7ac0446eacb7dff6ca466f656b3152793 /libkcal/icalformatimpl.cpp | |
parent | 54f5fe5e6f4909109edf915513c02f7af3e7bb2d (diff) | |
download | kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.zip kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.tar.gz kdepimpi-79b12b680f6a0653bcff84c8ef83b23803246b7d.tar.bz2 |
fixes
-rw-r--r-- | libkcal/icalformatimpl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index eae41aa..fe7413f 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -368,5 +368,5 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) // related event - if (incidence->relatedTo()) { + if (!incidence->relatedToUid().isEmpty()) { icalcomponent_add_property(parent,icalproperty_new_relatedto( - incidence->relatedTo()->uid().utf8())); + incidence->relatedToUid().utf8())); } @@ -2038,3 +2038,5 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar) for ( ev=mEventsRelate.first(); ev != 0; ev=mEventsRelate.next() ) { - ev->setRelatedTo(cal->event(ev->relatedToUid())); + Incidence * inc = cal->event(ev->relatedToUid()); + if ( inc ) + ev->setRelatedTo( inc ); } @@ -2042,3 +2044,5 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar) for ( todo=mTodosRelate.first(); todo != 0; todo=mTodosRelate.next() ) { - todo->setRelatedTo(cal->todo(todo->relatedToUid())); + Incidence * inc = cal->todo(todo->relatedToUid()); + if ( inc ) + todo->setRelatedTo( inc ); } |