-rw-r--r-- | libkcal/calendarlocal.cpp | 2 | ||||
-rw-r--r-- | libkcal/icalformatimpl.cpp | 9 | ||||
-rw-r--r-- | libkcal/journal.cpp | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index eef8327..5baa7dc 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -243,33 +243,33 @@ bool CalendarLocal::save( const QString &fileName, CalFormat *format ) } void CalendarLocal::stopAllTodos() { for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) it->setRunning( false ); } void CalendarLocal::close() { Todo * i; for( i = mTodoList.first(); i; i = mTodoList.next() ) i->setRunning(false); mEventList.setAutoDelete( true ); mTodoList.setAutoDelete( true ); - mJournalList.setAutoDelete( false ); + mJournalList.setAutoDelete( true ); mEventList.clear(); mTodoList.clear(); mJournalList.clear(); mEventList.setAutoDelete( false ); mTodoList.setAutoDelete( false ); mJournalList.setAutoDelete( false ); setModified( false ); } bool CalendarLocal::addAnniversaryNoDup( Event *event ) { QString cat; bool isBirthday = true; diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index f349681..53aa039 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -1931,51 +1931,54 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar) deleteStr(s); } #endif // Store all events with a relatedTo property in a list for post-processing mEventsRelate.clear(); mTodosRelate.clear(); // TODO: make sure that only actually added ecvens go to this lists. icalcomponent *c; // Iterate through all todos c = icalcomponent_get_first_component(calendar,ICAL_VTODO_COMPONENT); while (c) { // kdDebug(5800) << "----Todo found" << endl; Todo *todo = readTodo(c); - if (!cal->todo(todo->uid())) cal->addTodo(todo); + if (!cal->todo(todo->uid())) + cal->addTodo(todo); c = icalcomponent_get_next_component(calendar,ICAL_VTODO_COMPONENT); } // Iterate through all events c = icalcomponent_get_first_component(calendar,ICAL_VEVENT_COMPONENT); while (c) { // kdDebug(5800) << "----Event found" << endl; Event *event = readEvent(c); - if (!cal->event(event->uid())) cal->addEvent(event); + if (!cal->event(event->uid())) + cal->addEvent(event); c = icalcomponent_get_next_component(calendar,ICAL_VEVENT_COMPONENT); } // Iterate through all journals c = icalcomponent_get_first_component(calendar,ICAL_VJOURNAL_COMPONENT); while (c) { // kdDebug(5800) << "----Journal found" << endl; Journal *journal = readJournal(c); - if (!cal->journal(journal->uid())) cal->addJournal(journal); + if (!cal->journal(journal->uid())) + cal->addJournal(journal); c = icalcomponent_get_next_component(calendar,ICAL_VJOURNAL_COMPONENT); } #if 0 initPropIterator(&i, vcal); // go through all the vobjects in the vcal while (moreIteration(&i)) { curVO = nextVObject(&i); /************************************************************************/ // now, check to see that the object is an event or todo. if (strcmp(vObjectName(curVO), VCEventProp) == 0) { if ((curVOProp = isAPropertyOf(curVO, KPilotStatusProp)) != 0) { diff --git a/libkcal/journal.cpp b/libkcal/journal.cpp index 859161f..c4e4474 100644 --- a/libkcal/journal.cpp +++ b/libkcal/journal.cpp @@ -11,36 +11,38 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "journal.h" using namespace KCal; Journal::Journal() { + qDebug("New JJJ "); } Journal::~Journal() { + qDebug("delete JJJ "); } Incidence *Journal::clone() { return new Journal(*this); } bool KCal::operator==( const Journal& j1, const Journal& j2 ) { return operator==( (const Incidence&)j1, (const Incidence&)j2 ); } QDateTime Journal::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const { |