summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-11-25 22:51:38 (UTC)
committer zautrix <zautrix>2005-11-25 22:51:38 (UTC)
commit0e18027f386280bf427ef9d0ffec61a5516cebda (patch) (side-by-side diff)
tree91f93d724d141b9f087e4cef0c1a11e354ee389a /libkcal
parentb71ee5442df23bb9900d3db6e6244773ee34ef13 (diff)
downloadkdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.zip
kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.gz
kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.bz2
sync
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index c33581c..c82ea92 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -940,97 +940,97 @@ void CalendarLocal::deleteJournal( Journal *journal )
QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date )
{
QPtrList<Journal> el;
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->calEnabled() && it->dtStart().date() == date) el.append( it );
return el;
}
Journal *CalendarLocal::journal( const QDate &date )
{
// kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl;
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->calEnabled() && it->dtStart().date() == date )
return it;
return 0;
}
Journal *CalendarLocal::journal( const QString &uid )
{
Journal * retVal = 0;
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->calEnabled() && it->uid() == uid ) {
if ( retVal ) {
if ( retVal->calID() > it->calID() ) {
retVal = it;
}
} else {
retVal = it;
}
}
return retVal;
}
QPtrList<Journal> CalendarLocal::journals()
{
QPtrList<Journal> el;
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->calEnabled() ) el.append( it );
return el;
}
void CalendarLocal::setCalendarRemove( int id )
{
{
QPtrList<Event> EventList = mEventList;
Event * ev = EventList.first();
while ( ev ) {
- if ( ev->calID() == id )
+ if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") )
deleteEvent( ev );
ev = EventList.next();
}
}
{
QPtrList<Todo> TodoList = mTodoList;
Todo * ev = TodoList.first();
while ( ev ) {
if ( ev->calID() == id )
deleteTodo( ev );
ev = TodoList.next();
}
}
{
QPtrList<Journal> JournalList = mJournalList;
Journal * ev = JournalList.first();
while ( ev ) {
if ( ev->calID() == id )
deleteJournal( ev );
ev = JournalList.next();
}
}
clearUndo(0);
}
void CalendarLocal::setAllCalendarEnabled( bool enable )
{
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
it->setCalEnabled( enable );
for ( Event *it = mEventList.first(); it; it = mEventList.next() )
it->setCalEnabled( enable );
for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() )
it->setCalEnabled( enable );
}
void CalendarLocal::setCalendarEnabled( int id, bool enable )
{
for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
if ( it->calID() == id ) it->setCalEnabled( enable );
for ( Event *it = mEventList.first(); it; it = mEventList.next() )
if ( it->calID() == id ) it->setCalEnabled( enable );