author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/calendarlocal.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkcal/calendarlocal.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index ce3cd09..cb52b7c 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -22,7 +22,7 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdebug.h> #include <kconfig.h> @@ -192,7 +192,7 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) // 2 look for raw inc in remote // if inc in local, replace it // if not in local, add it to default calendar - QPtrList<Incidence> localInc = rawIncidences(); + Q3PtrList<Incidence> localInc = rawIncidences(); Incidence* inL = localInc.first(); while ( inL ) { if ( ! inL->isReadOnly () ) @@ -200,7 +200,7 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) deleteIncidence( inL ); inL = localInc.next(); } - QPtrList<Incidence> er = remote->rawIncidences(); + Q3PtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); while ( inR ) { inL = incidenceForUid( inR->uid(),false ); @@ -259,9 +259,9 @@ void CalendarLocal::addCalendar( Calendar* cal ) { cal->setDontDeleteIncidencesOnClose(); setSyncEventsEnabled(); - QPtrList<Incidence> incList; + Q3PtrList<Incidence> incList; { - QPtrList<Event> EventList = cal->rawEvents(); + Q3PtrList<Event> EventList = cal->rawEvents(); Event * ev = EventList.first(); while ( ev ) { if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { @@ -279,7 +279,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) } { - QPtrList<Todo> TodoList = cal->rawTodos(); + Q3PtrList<Todo> TodoList = cal->rawTodos(); Todo * ev = TodoList.first(); while ( ev ) { ev->resetRelatedTo(); @@ -299,7 +299,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) } } { - QPtrList<Journal> JournalList = cal->journals(); + Q3PtrList<Journal> JournalList = cal->journals(); Journal * ev = JournalList.first(); while ( ev ) { Journal * se = journal( ev->uid() ); @@ -481,9 +481,9 @@ void CalendarLocal::deleteTodo( Todo *todo ) setupRelations( dup ); } -QPtrList<Todo> CalendarLocal::rawTodos() +Q3PtrList<Todo> CalendarLocal::rawTodos() { - QPtrList<Todo> el; + Q3PtrList<Todo> el; for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) if ( it->calEnabled() ) el.append( it ); return el; @@ -499,13 +499,13 @@ Todo *CalendarLocal::todo( QString syncProf, QString id ) } void CalendarLocal::removeSyncInfo( QString syncProfile) { - QPtrList<Incidence> all = rawIncidences() ; + Q3PtrList<Incidence> all = rawIncidences() ; Incidence *inc; for ( inc = all.first(); inc; inc = all.next() ) { inc->removeID( syncProfile ); } if ( syncProfile.isEmpty() ) { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) @@ -520,9 +520,9 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) deleteIncidence ( lse ); } } -QPtrList<Event> CalendarLocal::getExternLastSyncEvents() +Q3PtrList<Event> CalendarLocal::getExternLastSyncEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) @@ -685,9 +685,9 @@ void CalendarLocal::deRegisterAlarm() // #endif } -QPtrList<Todo> CalendarLocal::todos( const QDate &date ) +Q3PtrList<Todo> CalendarLocal::todos( const QDate &date ) { - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; Todo *todo; for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { @@ -786,7 +786,7 @@ Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to ) void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, const QDateTime &from, const QDateTime &to ) { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { // kdDebug(5800) << "CalendarLocal::appendAlarms() '" << alarm->text() @@ -805,7 +805,7 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, const QDateTime &to ) { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; QDateTime qdt; for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { @@ -844,9 +844,9 @@ void CalendarLocal::insertEvent( Event *event ) } -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) { - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; Event *event; for( event = mEventList.first(); event; event = mEventList.next() ) { @@ -878,7 +878,7 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) // kdDebug(5800) << "Sorting events for date\n" << endl; // now, we have to sort it based on dtStart.time() - QPtrList<Event> eventListSorted; + Q3PtrList<Event> eventListSorted; Event *sortEvent; for ( event = eventList.first(); event; event = eventList.next() ) { sortEvent = eventListSorted.first(); @@ -894,12 +894,12 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) } -QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, +Q3PtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool inclusive ) { Event *event = 0; - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; // Get non-recurring events for( event = mEventList.first(); event; event = mEventList.next() ) { @@ -923,7 +923,7 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, } } else { bool founOne; - QDate next = event->getNextOccurence( start, &founOne ).date(); + QDate next = event->getNextOccurence( (QDateTime)start, &founOne ).date(); if ( founOne ) { if ( next <= end ) { found = true; @@ -972,14 +972,14 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, return eventList; } -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) { return rawEventsForDate( qdt.date() ); } -QPtrList<Event> CalendarLocal::rawEvents() +Q3PtrList<Event> CalendarLocal::rawEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; for ( Event *it = mEventList.first(); it; it = mEventList.next() ) if ( it->calEnabled() ) el.append( it ); return el; @@ -1006,9 +1006,9 @@ void CalendarLocal::deleteJournal( Journal *journal ) } } -QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) +Q3PtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) if ( it->calEnabled() && it->dtStart().date() == date) el.append( it ); return el; @@ -1040,9 +1040,9 @@ Journal *CalendarLocal::journal( const QString &uid ) return retVal; } -QPtrList<Journal> CalendarLocal::journals() +Q3PtrList<Journal> CalendarLocal::journals() { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) if ( it->calEnabled() ) el.append( it ); return el; @@ -1051,7 +1051,7 @@ void CalendarLocal::setCalendarRemove( int id ) { { - QPtrList<Event> EventList = mEventList; + Q3PtrList<Event> EventList = mEventList; Event * ev = EventList.first(); while ( ev ) { if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") ) @@ -1061,7 +1061,7 @@ void CalendarLocal::setCalendarRemove( int id ) } { - QPtrList<Todo> TodoList = mTodoList; + Q3PtrList<Todo> TodoList = mTodoList; Todo * ev = TodoList.first(); while ( ev ) { if ( ev->calID() == id ) @@ -1070,7 +1070,7 @@ void CalendarLocal::setCalendarRemove( int id ) } } { - QPtrList<Journal> JournalList = mJournalList; + Q3PtrList<Journal> JournalList = mJournalList; Journal * ev = JournalList.first(); while ( ev ) { if ( ev->calID() == id ) |