[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] [PATCH] libkcal: Losing the related-to tag for vevents
From: Mark Bucciarelli <mark () easymailings ! com>
Date: 2003-09-17 14:28:42
[Download RAW message or body]
I'm losing the relatedToUid tag for vevents. Here's the steps to reproduce
with the version of KArm in CVS:
1. Open a blank.ics
2. Add a task
3. Start timer
4. Stop timer
5. Close KArm
6. Look at blank.ics--one todo, one vevent with a related-to tag.
7. Open KArm.
8. Close KArm
9. Look at blank.ics--the event related-to tag is gone.
Steps 7 and 8 don't touch iCalendar events, they deal only with todo's.
On a related note (sorry ...) I previously noticed that using
Incidence::setRelatedToUid(const QString&) method does not write a related-to
tag. You have to use Incidence::setRelatedTo(Incidence*).
This occurs because icalformatimpl.cpp checks relatedTo() but not
relatedToUid() to determine if there is a relation. Attached is a patch that
fixes this problem.
Ok to apply?
Regards,
Mark
["libkcal-relatedto.diff" (text/x-diff)]
Index: icalformatimpl.cpp
===================================================================
RCS file: /home/kde/kdepim/libkcal/icalformatimpl.cpp,v
retrieving revision 1.87
diff -u -p -r1.87 icalformatimpl.cpp
--- icalformatimpl.cpp 5 Sep 2003 23:17:53 -0000 1.87
+++ icalformatimpl.cpp 17 Sep 2003 14:29:37 -0000
@@ -361,9 +361,10 @@ void ICalFormatImpl::writeIncidence(ical
*/
// related event
- if (incidence->relatedTo()) {
+ if (! incidence->relatedToUid().isNull())
+ {
icalcomponent_add_property(parent,icalproperty_new_relatedto(
- incidence->relatedTo()->uid().utf8()));
+ incidence->relatedToUid().utf8()));
}
// recurrence rule stuff
Index: incidence.cpp
===================================================================
RCS file: /home/kde/kdepim/libkcal/incidence.cpp,v
retrieving revision 1.38
diff -u -p -r1.38 incidence.cpp
--- incidence.cpp 5 Sep 2003 23:17:53 -0000 1.38
+++ incidence.cpp 17 Sep 2003 14:29:38 -0000
@@ -261,6 +261,7 @@ void Incidence::setRelatedTo(Incidence *
mRelatedTo->removeRelation(this);
mRelatedTo = relatedTo;
if (mRelatedTo) mRelatedTo->addRelation(this);
+ setRelatedToUid(mRelatedTo->uid());
}
Incidence *Incidence::relatedTo() const
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic