author | zautrix <zautrix> | 2005-06-13 10:51:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-13 10:51:47 (UTC) |
commit | 4f3ff02932b39bf16b9692c3cb69c101a28b4616 (patch) (unidiff) | |
tree | bae36a7e654c788a0994bb353f3997b495e2459c /libkcal/calendarlocal.cpp | |
parent | 2be8214908c52298ba79c8058d340edca5a8b417 (diff) | |
download | kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.zip kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.tar.gz kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.tar.bz2 |
fixx
-rw-r--r-- | libkcal/calendarlocal.cpp | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index c5500bf..e48122a 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -1,166 +1,204 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkcal. | 2 | This file is part of libkcal. |
3 | 3 | ||
4 | Copyright (c) 1998 Preston Brown | 4 | Copyright (c) 1998 Preston Brown |
5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> | 5 | Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or |
8 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public |
9 | License as published by the Free Software Foundation; either | 9 | License as published by the Free Software Foundation; either |
10 | version 2 of the License, or (at your option) any later version. | 10 | version 2 of the License, or (at your option) any later version. |
11 | 11 | ||
12 | This library is distributed in the hope that it will be useful, | 12 | This library is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Library General Public License for more details. | 15 | Library General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU Library General Public License | 17 | You should have received a copy of the GNU Library General Public License |
18 | along with this library; see the file COPYING.LIB. If not, write to | 18 | along with this library; see the file COPYING.LIB. If not, write to |
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qptrlist.h> | 25 | #include <qptrlist.h> |
26 | 26 | ||
27 | #include <kdebug.h> | 27 | #include <kdebug.h> |
28 | #include <kconfig.h> | 28 | #include <kconfig.h> |
29 | #include <kglobal.h> | 29 | #include <kglobal.h> |
30 | #include <klocale.h> | 30 | #include <klocale.h> |
31 | 31 | ||
32 | #include "vcaldrag.h" | 32 | #include "vcaldrag.h" |
33 | #include "vcalformat.h" | 33 | #include "vcalformat.h" |
34 | #include "icalformat.h" | 34 | #include "icalformat.h" |
35 | #include "exceptions.h" | 35 | #include "exceptions.h" |
36 | #include "incidence.h" | 36 | #include "incidence.h" |
37 | #include "journal.h" | 37 | #include "journal.h" |
38 | #include "filestorage.h" | 38 | #include "filestorage.h" |
39 | #include "calfilter.h" | 39 | #include "calfilter.h" |
40 | 40 | ||
41 | #include "calendarlocal.h" | 41 | #include "calendarlocal.h" |
42 | 42 | ||
43 | // #ifndef DESKTOP_VERSION | 43 | // #ifndef DESKTOP_VERSION |
44 | // #include <qtopia/alarmserver.h> | 44 | // #include <qtopia/alarmserver.h> |
45 | // #endif | 45 | // #endif |
46 | using namespace KCal; | 46 | using namespace KCal; |
47 | 47 | ||
48 | CalendarLocal::CalendarLocal() | 48 | CalendarLocal::CalendarLocal() |
49 | : Calendar() | 49 | : Calendar() |
50 | { | 50 | { |
51 | init(); | 51 | init(); |
52 | } | 52 | } |
53 | 53 | ||
54 | CalendarLocal::CalendarLocal(const QString &timeZoneId) | 54 | CalendarLocal::CalendarLocal(const QString &timeZoneId) |
55 | : Calendar(timeZoneId) | 55 | : Calendar(timeZoneId) |
56 | { | 56 | { |
57 | init(); | 57 | init(); |
58 | } | 58 | } |
59 | 59 | ||
60 | void CalendarLocal::init() | 60 | void CalendarLocal::init() |
61 | { | 61 | { |
62 | mNextAlarmIncidence = 0; | 62 | mNextAlarmIncidence = 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | CalendarLocal::~CalendarLocal() | 66 | CalendarLocal::~CalendarLocal() |
67 | { | 67 | { |
68 | close(); | 68 | if ( mDeleteIncidencesOnClose ) |
69 | close(); | ||
70 | } | ||
71 | bool CalendarLocal::addCalendarFile( QString name, int id ) | ||
72 | { | ||
73 | CalendarLocal calendar( timeZoneId() ); | ||
74 | calendar.setDefaultCalendar( id ); | ||
75 | if ( calendar.load( name ) ) { | ||
76 | addCalendar( &calendar ); | ||
77 | return true; | ||
78 | } | ||
79 | return false; | ||
80 | } | ||
81 | void CalendarLocal::addCalendar( Calendar* cal ) | ||
82 | { | ||
83 | cal->setDontDeleteIncidencesOnClose(); | ||
84 | { | ||
85 | QPtrList<Event> EventList = cal->rawEvents(); | ||
86 | Event * ev = EventList.first(); | ||
87 | while ( ev ) { | ||
88 | mEventList.append( ev ); | ||
89 | ev = EventList.next(); | ||
90 | } | ||
91 | } | ||
92 | { | ||
93 | QPtrList<Todo> TodoList = cal->rawTodos(); | ||
94 | Todo * ev = TodoList.first(); | ||
95 | while ( ev ) { | ||
96 | mTodoList.append( ev ); | ||
97 | ev = TodoList.next(); | ||
98 | } | ||
99 | } | ||
100 | { | ||
101 | QPtrList<Journal> JournalList = cal->journals(); | ||
102 | Journal * ev = JournalList.first(); | ||
103 | while ( ev ) { | ||
104 | mJournalList.append( ev ); | ||
105 | ev = JournalList.next(); | ||
106 | } | ||
107 | } | ||
69 | } | 108 | } |
70 | |||
71 | bool CalendarLocal::load( const QString &fileName ) | 109 | bool CalendarLocal::load( const QString &fileName ) |
72 | { | 110 | { |
73 | FileStorage storage( this, fileName ); | 111 | FileStorage storage( this, fileName ); |
74 | return storage.load(); | 112 | return storage.load(); |
75 | } | 113 | } |
76 | 114 | ||
77 | bool CalendarLocal::save( const QString &fileName, CalFormat *format ) | 115 | bool CalendarLocal::save( const QString &fileName, CalFormat *format ) |
78 | { | 116 | { |
79 | FileStorage storage( this, fileName, format ); | 117 | FileStorage storage( this, fileName, format ); |
80 | return storage.save(); | 118 | return storage.save(); |
81 | } | 119 | } |
82 | 120 | ||
83 | void CalendarLocal::close() | 121 | void CalendarLocal::close() |
84 | { | 122 | { |
85 | 123 | ||
86 | Todo * i; | 124 | Todo * i; |
87 | for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); | 125 | for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); |
88 | 126 | ||
89 | mEventList.setAutoDelete( true ); | 127 | mEventList.setAutoDelete( true ); |
90 | mTodoList.setAutoDelete( true ); | 128 | mTodoList.setAutoDelete( true ); |
91 | mJournalList.setAutoDelete( false ); | 129 | mJournalList.setAutoDelete( false ); |
92 | 130 | ||
93 | mEventList.clear(); | 131 | mEventList.clear(); |
94 | mTodoList.clear(); | 132 | mTodoList.clear(); |
95 | mJournalList.clear(); | 133 | mJournalList.clear(); |
96 | 134 | ||
97 | mEventList.setAutoDelete( false ); | 135 | mEventList.setAutoDelete( false ); |
98 | mTodoList.setAutoDelete( false ); | 136 | mTodoList.setAutoDelete( false ); |
99 | mJournalList.setAutoDelete( false ); | 137 | mJournalList.setAutoDelete( false ); |
100 | 138 | ||
101 | setModified( false ); | 139 | setModified( false ); |
102 | } | 140 | } |
103 | 141 | ||
104 | bool CalendarLocal::addAnniversaryNoDup( Event *event ) | 142 | bool CalendarLocal::addAnniversaryNoDup( Event *event ) |
105 | { | 143 | { |
106 | QString cat; | 144 | QString cat; |
107 | bool isBirthday = true; | 145 | bool isBirthday = true; |
108 | if( event->categoriesStr() == i18n( "Anniversary" ) ) { | 146 | if( event->categoriesStr() == i18n( "Anniversary" ) ) { |
109 | isBirthday = false; | 147 | isBirthday = false; |
110 | cat = i18n( "Anniversary" ); | 148 | cat = i18n( "Anniversary" ); |
111 | } else if( event->categoriesStr() == i18n( "Birthday" ) ) { | 149 | } else if( event->categoriesStr() == i18n( "Birthday" ) ) { |
112 | isBirthday = true; | 150 | isBirthday = true; |
113 | cat = i18n( "Birthday" ); | 151 | cat = i18n( "Birthday" ); |
114 | } else { | 152 | } else { |
115 | qDebug("addAnniversaryNoDup called without fitting category! "); | 153 | qDebug("addAnniversaryNoDup called without fitting category! "); |
116 | return false; | 154 | return false; |
117 | } | 155 | } |
118 | Event * eve; | 156 | Event * eve; |
119 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { | 157 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { |
120 | if ( !(eve->categories().contains( cat ) )) | 158 | if ( !(eve->categories().contains( cat ) )) |
121 | continue; | 159 | continue; |
122 | // now we have an event with fitting category | 160 | // now we have an event with fitting category |
123 | if ( eve->dtStart().date() != event->dtStart().date() ) | 161 | if ( eve->dtStart().date() != event->dtStart().date() ) |
124 | continue; | 162 | continue; |
125 | // now we have an event with fitting category+date | 163 | // now we have an event with fitting category+date |
126 | if ( eve->summary() != event->summary() ) | 164 | if ( eve->summary() != event->summary() ) |
127 | continue; | 165 | continue; |
128 | // now we have an event with fitting category+date+summary | 166 | // now we have an event with fitting category+date+summary |
129 | return false; | 167 | return false; |
130 | } | 168 | } |
131 | return addEvent( event ); | 169 | return addEvent( event ); |
132 | 170 | ||
133 | } | 171 | } |
134 | bool CalendarLocal::addEventNoDup( Event *event ) | 172 | bool CalendarLocal::addEventNoDup( Event *event ) |
135 | { | 173 | { |
136 | Event * eve; | 174 | Event * eve; |
137 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { | 175 | for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { |
138 | if ( *eve == *event ) { | 176 | if ( *eve == *event ) { |
139 | //qDebug("CalendarLocal::Duplicate event found! Not inserted! "); | 177 | //qDebug("CalendarLocal::Duplicate event found! Not inserted! "); |
140 | return false; | 178 | return false; |
141 | } | 179 | } |
142 | } | 180 | } |
143 | return addEvent( event ); | 181 | return addEvent( event ); |
144 | } | 182 | } |
145 | 183 | ||
146 | bool CalendarLocal::addEvent( Event *event ) | 184 | bool CalendarLocal::addEvent( Event *event ) |
147 | { | 185 | { |
148 | insertEvent( event ); | 186 | insertEvent( event ); |
149 | 187 | ||
150 | event->registerObserver( this ); | 188 | event->registerObserver( this ); |
151 | 189 | ||
152 | setModified( true ); | 190 | setModified( true ); |
153 | event->setCalID( mDefaultCalendar ); | 191 | event->setCalID( mDefaultCalendar ); |
154 | event->setCalEnabled( true ); | 192 | event->setCalEnabled( true ); |
155 | 193 | ||
156 | return true; | 194 | return true; |
157 | } | 195 | } |
158 | 196 | ||
159 | void CalendarLocal::deleteEvent( Event *event ) | 197 | void CalendarLocal::deleteEvent( Event *event ) |
160 | { | 198 | { |
161 | if ( mUndoIncidence ) delete mUndoIncidence; | 199 | if ( mUndoIncidence ) delete mUndoIncidence; |
162 | mUndoIncidence = event->clone(); | 200 | mUndoIncidence = event->clone(); |
163 | if ( mEventList.removeRef( event ) ) { | 201 | if ( mEventList.removeRef( event ) ) { |
164 | setModified( true ); | 202 | setModified( true ); |
165 | } | 203 | } |
166 | } | 204 | } |
@@ -663,120 +701,134 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, | |||
663 | 701 | ||
664 | if ( inclusive ) { | 702 | if ( inclusive ) { |
665 | if ( s >= start && e <= end ) { | 703 | if ( s >= start && e <= end ) { |
666 | eventList.append( event ); | 704 | eventList.append( event ); |
667 | } | 705 | } |
668 | } else { | 706 | } else { |
669 | if ( ( s >= start && s <= end ) || ( e >= start && e <= end ) ) { | 707 | if ( ( s >= start && s <= end ) || ( e >= start && e <= end ) ) { |
670 | eventList.append( event ); | 708 | eventList.append( event ); |
671 | } | 709 | } |
672 | } | 710 | } |
673 | } | 711 | } |
674 | } | 712 | } |
675 | 713 | ||
676 | return eventList; | 714 | return eventList; |
677 | } | 715 | } |
678 | 716 | ||
679 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) | 717 | QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) |
680 | { | 718 | { |
681 | return rawEventsForDate( qdt.date() ); | 719 | return rawEventsForDate( qdt.date() ); |
682 | } | 720 | } |
683 | 721 | ||
684 | QPtrList<Event> CalendarLocal::rawEvents() | 722 | QPtrList<Event> CalendarLocal::rawEvents() |
685 | { | 723 | { |
686 | QPtrList<Event> el; | 724 | QPtrList<Event> el; |
687 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 725 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
688 | if ( it->calEnabled() ) el.append( it ); | 726 | if ( it->calEnabled() ) el.append( it ); |
689 | return el; | 727 | return el; |
690 | } | 728 | } |
691 | 729 | ||
692 | bool CalendarLocal::addJournal(Journal *journal) | 730 | bool CalendarLocal::addJournal(Journal *journal) |
693 | { | 731 | { |
694 | if ( journal->dtStart().isValid()) | 732 | if ( journal->dtStart().isValid()) |
695 | kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl; | 733 | kdDebug(5800) << "Adding Journal on " << journal->dtStart().toString() << endl; |
696 | else | 734 | else |
697 | kdDebug(5800) << "Adding Journal without a DTSTART" << endl; | 735 | kdDebug(5800) << "Adding Journal without a DTSTART" << endl; |
698 | 736 | ||
699 | mJournalList.append(journal); | 737 | mJournalList.append(journal); |
700 | 738 | ||
701 | journal->registerObserver( this ); | 739 | journal->registerObserver( this ); |
702 | 740 | ||
703 | setModified( true ); | 741 | setModified( true ); |
704 | journal->setCalID( mDefaultCalendar ); | 742 | journal->setCalID( mDefaultCalendar ); |
705 | journal->setCalEnabled( true ); | 743 | journal->setCalEnabled( true ); |
706 | return true; | 744 | return true; |
707 | } | 745 | } |
708 | 746 | ||
709 | void CalendarLocal::deleteJournal( Journal *journal ) | 747 | void CalendarLocal::deleteJournal( Journal *journal ) |
710 | { | 748 | { |
711 | if ( mUndoIncidence ) delete mUndoIncidence; | 749 | if ( mUndoIncidence ) delete mUndoIncidence; |
712 | mUndoIncidence = journal->clone(); | 750 | mUndoIncidence = journal->clone(); |
713 | mUndoIncidence->setSummary( mUndoIncidence->description().left(25)); | 751 | mUndoIncidence->setSummary( mUndoIncidence->description().left(25)); |
714 | if ( mJournalList.removeRef(journal) ) { | 752 | if ( mJournalList.removeRef(journal) ) { |
715 | setModified( true ); | 753 | setModified( true ); |
716 | } | 754 | } |
717 | } | 755 | } |
718 | 756 | ||
719 | Journal *CalendarLocal::journal( const QDate &date ) | 757 | Journal *CalendarLocal::journal( const QDate &date ) |
720 | { | 758 | { |
721 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; | 759 | // kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; |
722 | 760 | ||
723 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 761 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
724 | if ( it->calEnabled() && it->dtStart().date() == date ) | 762 | if ( it->calEnabled() && it->dtStart().date() == date ) |
725 | return it; | 763 | return it; |
726 | 764 | ||
727 | return 0; | 765 | return 0; |
728 | } | 766 | } |
729 | 767 | ||
730 | Journal *CalendarLocal::journal( const QString &uid ) | 768 | Journal *CalendarLocal::journal( const QString &uid ) |
731 | { | 769 | { |
732 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 770 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
733 | if ( it->calEnabled() && it->uid() == uid ) | 771 | if ( it->calEnabled() && it->uid() == uid ) |
734 | return it; | 772 | return it; |
735 | 773 | ||
736 | return 0; | 774 | return 0; |
737 | } | 775 | } |
738 | 776 | ||
739 | QPtrList<Journal> CalendarLocal::journals() | 777 | QPtrList<Journal> CalendarLocal::journals() |
740 | { | 778 | { |
741 | QPtrList<Journal> el; | 779 | QPtrList<Journal> el; |
742 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 780 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
743 | if ( it->calEnabled() ) el.append( it ); | 781 | if ( it->calEnabled() ) el.append( it ); |
744 | return el; | 782 | return el; |
745 | } | 783 | } |
746 | 784 | ||
747 | void CalendarLocal::setCalendarEnabled( int id, bool enable ) | 785 | void CalendarLocal::setCalendarEnabled( int id, bool enable ) |
748 | { | 786 | { |
749 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 787 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
750 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 788 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
751 | 789 | ||
752 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 790 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
753 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 791 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
754 | 792 | ||
755 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 793 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
756 | if ( it->calID() == id ) it->setCalEnabled( enable ); | 794 | if ( it->calID() == id ) it->setCalEnabled( enable ); |
757 | 795 | ||
758 | } | 796 | } |
797 | |||
798 | void CalendarLocal::setReadOnly( int id, bool enable ) | ||
799 | { | ||
800 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | ||
801 | if ( it->calID() == id ) it->setReadOnly( enable ); | ||
802 | |||
803 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | ||
804 | if ( it->calID() == id ) it->setReadOnly( enable ); | ||
805 | |||
806 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | ||
807 | if ( it->calID() == id ) it->setReadOnly( enable ); | ||
808 | |||
809 | } | ||
810 | |||
759 | void CalendarLocal::setAlarmEnabled( int id, bool enable ) | 811 | void CalendarLocal::setAlarmEnabled( int id, bool enable ) |
760 | { | 812 | { |
761 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 813 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
762 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 814 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
763 | 815 | ||
764 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 816 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
765 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 817 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
766 | 818 | ||
767 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 819 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
768 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); | 820 | if ( it->calID() == id ) it->setAlarmEnabled( enable ); |
769 | 821 | ||
770 | } | 822 | } |
771 | void CalendarLocal::setDefaultCalendarEnabledOnly() | 823 | void CalendarLocal::setDefaultCalendarEnabledOnly() |
772 | { | 824 | { |
773 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | 825 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) |
774 | it->setCalEnabled( it->calID() == mDefaultCalendar ); | 826 | it->setCalEnabled( it->calID() == mDefaultCalendar ); |
775 | 827 | ||
776 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) | 828 | for ( Event *it = mEventList.first(); it; it = mEventList.next() ) |
777 | it->setCalEnabled( it->calID() == mDefaultCalendar); | 829 | it->setCalEnabled( it->calID() == mDefaultCalendar); |
778 | 830 | ||
779 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) | 831 | for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) |
780 | it->setCalEnabled( it->calID() == mDefaultCalendar); | 832 | it->setCalEnabled( it->calID() == mDefaultCalendar); |
781 | 833 | ||
782 | } | 834 | } |