summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 1350f6d..9b38d3f 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -398,71 +398,71 @@ Incidence* Calendar::incidence( const QString& uid )
Incidence* i;
if( (i = todo( uid )) != 0 )
return i;
if( (i = event( uid )) != 0 )
return i;
if( (i = journal( uid )) != 0 )
return i;
return 0;
}
QPtrList<Todo> Calendar::todos()
{
QPtrList<Todo> tl = rawTodos();
mFilter->apply( &tl );
return tl;
}
// When this is called, the todo have already been added to the calendar.
// This method is only about linking related todos
void Calendar::setupRelations( Incidence *incidence )
{
QString uid = incidence->uid();
- //qDebug("Calendar::setupRelations %s", incidence->summary().latin1());
+ qDebug("Calendar::setupRelations %s", incidence->summary().latin1());
// First, go over the list of orphans and see if this is their parent
while( Incidence* i = mOrphans[ uid ] ) {
mOrphans.remove( uid );
i->setRelatedTo( incidence );
- //qDebug("Add child %s ti inc %s", i->summary().latin1(),incidence->summary().latin1());
+ qDebug("Add child %s ti inc %s", i->summary().latin1(),incidence->summary().latin1());
incidence->addRelation( i );
mOrphanUids.remove( i->uid() );
}
// Now see about this incidences parent
if( !incidence->relatedTo() && !incidence->relatedToUid().isEmpty() ) {
// This incidence has a uid it is related to, but is not registered to it yet
// Try to find it
- //qDebug("Test parent for %s", incidence->summary().latin1());
+ qDebug("Test parent for %s", incidence->summary().latin1());
Incidence* parent = this->incidenceForUid( incidence->relatedToUid(), true );
if( parent ) {
// Found it
- // qDebug("parent found for for %s", incidence->summary().latin1());
+ qDebug("parent found for for %s", incidence->summary().latin1());
incidence->setRelatedTo( parent );
parent->addRelation( incidence );
} else {
- // qDebug("NO parent found for for %s", incidence->summary().latin1());
+ qDebug("NO parent found for for %s", incidence->summary().latin1());
// Not found, put this in the mOrphans list
mOrphans.insert( incidence->relatedToUid(), incidence );
mOrphanUids.insert( incidence->uid(), incidence );
}
}
}
// If a task with subtasks is deleted, move it's subtasks to the orphans list
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() )