Version: (using KDE Devel)
Installed from: Compiled sources
When calling Incidence::removeRelation, nothing seems to happen. I wrote a test case for this:
/* test case for Incidence::removeRelation
(c) 2007 by Thorsten Staerk
This test case associates a todo with another, removes this relation
and shows if the removal was successful.
Compile it like this:
g++ -I/opt/kde3/include -I/usr/lib/qt3/include -lqt-mt -L/usr/lib/qt3/lib -lkcal -L/opt/kde3/lib main.cpp
KCal::Todo* i=new KCal::Todo();
KCal::Todo* b=new KCal::Todo();
kdDebug() << "b is now related to " << b->relatedTo() << endl;
kdDebug() << "I expect the following to be empty: " << b->relatedTo() << endl;
b->relatedTo stays something even after b->removeRelation.
I fixed this for trunk, see http://websvn.kde.org/trunk/KDE/kdepimlibs/kcal/incidence.cpp?r1=663415&r2=675345
>I fixed this for trunk
Excellent. Can you backport that to 3.5 branch as well?
Or should someone else do that? (probably the KCal maintainer, whoever that is)
I can backport it to trunk, I just wanted to have a "go ahead" from someone.
SVN commit 687820 by tstaerk:
Really remove relatedUids.
--This linie, and those below, will be ignored--
M +3 -0 incidence.cpp
--- branches/KDE/3.5/kdepim/libkcal/incidence.cpp #687819:687820
@@ -321,9 +321,12 @@
void Incidence::removeRelation(Incidence *event)
+// Remove the relation of our incident. E.g. if you have a task t and a
+// subtask, the subtask will have its relation to the task t.
// if (event->getRelatedTo() == this) event->setRelatedTo(0);