summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
authorzautrix <zautrix>2005-11-25 22:51:38 (UTC)
committer zautrix <zautrix>2005-11-25 22:51:38 (UTC)
commit0e18027f386280bf427ef9d0ffec61a5516cebda (patch) (unidiff)
tree91f93d724d141b9f087e4cef0c1a11e354ee389a /libkcal/calendarlocal.cpp
parentb71ee5442df23bb9900d3db6e6244773ee34ef13 (diff)
downloadkdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.zip
kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.gz
kdepimpi-0e18027f386280bf427ef9d0ffec61a5516cebda.tar.bz2
sync
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (ignore 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
@@ -956,65 +956,65 @@ Journal *CalendarLocal::journal( const QDate &date )
956} 956}
957 957
958Journal *CalendarLocal::journal( const QString &uid ) 958Journal *CalendarLocal::journal( const QString &uid )
959{ 959{
960 Journal * retVal = 0; 960 Journal * retVal = 0;
961 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 961 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
962 if ( it->calEnabled() && it->uid() == uid ) { 962 if ( it->calEnabled() && it->uid() == uid ) {
963 if ( retVal ) { 963 if ( retVal ) {
964 if ( retVal->calID() > it->calID() ) { 964 if ( retVal->calID() > it->calID() ) {
965 retVal = it; 965 retVal = it;
966 } 966 }
967 } else { 967 } else {
968 retVal = it; 968 retVal = it;
969 } 969 }
970 } 970 }
971 return retVal; 971 return retVal;
972} 972}
973 973
974QPtrList<Journal> CalendarLocal::journals() 974QPtrList<Journal> CalendarLocal::journals()
975{ 975{
976 QPtrList<Journal> el; 976 QPtrList<Journal> el;
977 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 977 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
978 if ( it->calEnabled() ) el.append( it ); 978 if ( it->calEnabled() ) el.append( it );
979 return el; 979 return el;
980} 980}
981void CalendarLocal::setCalendarRemove( int id ) 981void CalendarLocal::setCalendarRemove( int id )
982{ 982{
983 983
984 { 984 {
985 QPtrList<Event> EventList = mEventList; 985 QPtrList<Event> EventList = mEventList;
986 Event * ev = EventList.first(); 986 Event * ev = EventList.first();
987 while ( ev ) { 987 while ( ev ) {
988 if ( ev->calID() == id ) 988 if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") )
989 deleteEvent( ev ); 989 deleteEvent( ev );
990 ev = EventList.next(); 990 ev = EventList.next();
991 } 991 }
992 } 992 }
993 { 993 {
994 994
995 QPtrList<Todo> TodoList = mTodoList; 995 QPtrList<Todo> TodoList = mTodoList;
996 Todo * ev = TodoList.first(); 996 Todo * ev = TodoList.first();
997 while ( ev ) { 997 while ( ev ) {
998 if ( ev->calID() == id ) 998 if ( ev->calID() == id )
999 deleteTodo( ev ); 999 deleteTodo( ev );
1000 ev = TodoList.next(); 1000 ev = TodoList.next();
1001 } 1001 }
1002 } 1002 }
1003 { 1003 {
1004 QPtrList<Journal> JournalList = mJournalList; 1004 QPtrList<Journal> JournalList = mJournalList;
1005 Journal * ev = JournalList.first(); 1005 Journal * ev = JournalList.first();
1006 while ( ev ) { 1006 while ( ev ) {
1007 if ( ev->calID() == id ) 1007 if ( ev->calID() == id )
1008 deleteJournal( ev ); 1008 deleteJournal( ev );
1009 ev = JournalList.next(); 1009 ev = JournalList.next();
1010 } 1010 }
1011 } 1011 }
1012 1012
1013 clearUndo(0); 1013 clearUndo(0);
1014 1014
1015} 1015}
1016 1016
1017void CalendarLocal::setAllCalendarEnabled( bool enable ) 1017void CalendarLocal::setAllCalendarEnabled( bool enable )
1018{ 1018{
1019 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 1019 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
1020 it->setCalEnabled( enable ); 1020 it->setCalEnabled( enable );