summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/calendar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 5092d1a..a662eeb 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -430,33 +430,33 @@ void Calendar::setupRelations( Incidence *incidence )
void Calendar::removeRelations( Incidence *incidence )
{
// qDebug("Calendar::removeRelations ");
- QString uid = incidence->uid();
-
- QPtrList<Incidence> relations = incidence->relations();
- for( Incidence* i = relations.first(); i; i = relations.next() )
- if( !mOrphanUids.find( i->uid() ) ) {
- mOrphans.insert( uid, i );
- mOrphanUids.insert( i->uid(), i );
- i->setRelatedTo( 0 );
- i->setRelatedToUid( uid );
- }
-
- // If this incidence is related to something else, tell that about it
- if( incidence->relatedTo() )
- incidence->relatedTo()->removeRelation( incidence );
-
- // Remove this one from the orphans list
- if( mOrphanUids.remove( uid ) )
- // This incidence is located in the orphans list - it should be removed
- if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
- // Removing wasn't that easy
- for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
- if( it.current()->uid() == uid ) {
- mOrphans.remove( it.currentKey() );
- break;
- }
- }
- }
+ QString uid = incidence->uid();
+
+ QPtrList<Incidence> relations = incidence->relations();
+ for( Incidence* i = relations.first(); i; i = relations.next() )
+ if( !mOrphanUids.find( i->uid() ) ) {
+ mOrphans.insert( uid, i );
+ mOrphanUids.insert( i->uid(), i );
+ i->setRelatedTo( 0 );
+ i->setRelatedToUid( uid );
+ }
+
+ // If this incidence is related to something else, tell that about it
+ if( incidence->relatedTo() )
+ incidence->relatedTo()->removeRelation( incidence );
+
+ // Remove this one from the orphans list
+ if( mOrphanUids.remove( uid ) )
+ // This incidence is located in the orphans list - it should be removed
+ if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
+ // Removing wasn't that easy
+ for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
+ if( it.current()->uid() == uid ) {
+ mOrphans.remove( it.currentKey() );
+ break;
+ }
+ }
+ }
}
void Calendar::registerObserver( Observer *observer )