summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/calendar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendar.cpp66
1 files changed, 34 insertions, 32 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 9b38d3f..bf095cf 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -30,6 +30,8 @@
#include "calendar.h"
#include "syncdefines.h"
+//Added by qt3to4:
+#include <Q3PtrList>
using namespace KCal;
@@ -271,19 +273,19 @@ CalFilter *Calendar::filter()
return mFilter;
}
-QPtrList<Incidence> Calendar::incidences()
+Q3PtrList<Incidence> Calendar::incidences()
{
- QPtrList<Incidence> incidences;
+ Q3PtrList<Incidence> incidences;
Incidence *i;
- QPtrList<Event> e = events();
+ Q3PtrList<Event> e = events();
for( i = e.first(); i; i = e.next() ) incidences.append( i );
- QPtrList<Todo> t = todos();
+ Q3PtrList<Todo> t = todos();
for( i = t.first(); i; i = t.next() ) incidences.append( i );
- QPtrList<Journal> j = journals();
+ Q3PtrList<Journal> j = journals();
for( i = j.first(); i; i = j.next() ) incidences.append( i );
return incidences;
@@ -291,77 +293,77 @@ QPtrList<Incidence> Calendar::incidences()
void Calendar::resetPilotStat(int id )
{
- QPtrList<Incidence> incidences;
+ Q3PtrList<Incidence> incidences;
Incidence *i;
- QPtrList<Event> e = rawEvents();
+ Q3PtrList<Event> e = rawEvents();
for( i = e.first(); i; i = e.next() ) i->setPilotId( id );
- QPtrList<Todo> t = rawTodos();
+ Q3PtrList<Todo> t = rawTodos();
for( i = t.first(); i; i = t.next() ) i->setPilotId( id );
- QPtrList<Journal> j = journals();
+ Q3PtrList<Journal> j = journals();
for( i = j.first(); i; i = j.next() ) i->setPilotId( id );
}
void Calendar::resetTempSyncStat()
{
- QPtrList<Incidence> incidences;
+ Q3PtrList<Incidence> incidences;
Incidence *i;
- QPtrList<Event> e = rawEvents();
+ Q3PtrList<Event> e = rawEvents();
for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
- QPtrList<Todo> t = rawTodos();
+ Q3PtrList<Todo> t = rawTodos();
for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
- QPtrList<Journal> j = journals();
+ Q3PtrList<Journal> j = journals();
for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
}
-QPtrList<Incidence> Calendar::rawIncidences()
+Q3PtrList<Incidence> Calendar::rawIncidences()
{
- QPtrList<Incidence> incidences;
+ Q3PtrList<Incidence> incidences;
Incidence *i;
- QPtrList<Event> e = rawEvents();
+ Q3PtrList<Event> e = rawEvents();
for( i = e.first(); i; i = e.next() ) incidences.append( i );
- QPtrList<Todo> t = rawTodos();
+ Q3PtrList<Todo> t = rawTodos();
for( i = t.first(); i; i = t.next() ) incidences.append( i );
- QPtrList<Journal> j = journals();
+ Q3PtrList<Journal> j = journals();
for( i = j.first(); i; i = j.next() ) incidences.append( i );
return incidences;
}
-QPtrList<Event> Calendar::events( const QDate &date, bool sorted )
+Q3PtrList<Event> Calendar::events( const QDate &date, bool sorted )
{
- QPtrList<Event> el = rawEventsForDate(date,sorted);
+ Q3PtrList<Event> el = rawEventsForDate(date,sorted);
mFilter->apply(&el);
return el;
}
-QPtrList<Event> Calendar::events( const QDateTime &qdt )
+Q3PtrList<Event> Calendar::events( const QDateTime &qdt )
{
- QPtrList<Event> el = rawEventsForDate(qdt);
+ Q3PtrList<Event> el = rawEventsForDate(qdt);
mFilter->apply(&el);
return el;
}
-QPtrList<Event> Calendar::events( const QDate &start, const QDate &end,
+Q3PtrList<Event> Calendar::events( const QDate &start, const QDate &end,
bool inclusive)
{
- QPtrList<Event> el = rawEvents(start,end,inclusive);
+ Q3PtrList<Event> el = rawEvents(start,end,inclusive);
mFilter->apply(&el);
return el;
}
-QPtrList<Event> Calendar::events()
+Q3PtrList<Event> Calendar::events()
{
- QPtrList<Event> el = rawEvents();
+ Q3PtrList<Event> el = rawEvents();
mFilter->apply(&el);
return el;
}
@@ -369,7 +371,7 @@ void Calendar::addIncidenceBranch(Incidence *i)
{
addIncidence( i );
Incidence * inc;
- QPtrList<Incidence> Relations = i->relations();
+ Q3PtrList<Incidence> Relations = i->relations();
for (inc=Relations.first();inc;inc=Relations.next()) {
addIncidenceBranch( inc );
}
@@ -407,9 +409,9 @@ Incidence* Calendar::incidence( const QString& uid )
return 0;
}
-QPtrList<Todo> Calendar::todos()
+Q3PtrList<Todo> Calendar::todos()
{
- QPtrList<Todo> tl = rawTodos();
+ Q3PtrList<Todo> tl = rawTodos();
mFilter->apply( &tl );
return tl;
}
@@ -455,7 +457,7 @@ void Calendar::removeRelations( Incidence *incidence )
// qDebug("Calendar::removeRelations ");
QString uid = incidence->uid();
- QPtrList<Incidence> relations = incidence->relations();
+ Q3PtrList<Incidence> relations = incidence->relations();
for( Incidence* i = relations.first(); i; i = relations.next() )
if( !mOrphanUids.find( i->uid() ) ) {
mOrphans.insert( uid, i );
@@ -471,7 +473,7 @@ void Calendar::removeRelations( Incidence *incidence )
// Remove this one from the orphans list
if( mOrphanUids.remove( uid ) ) {
QString r2uid = incidence->relatedToUid();
- QPtrList<Incidence> tempList;
+ Q3PtrList<Incidence> tempList;
while( Incidence* i = mOrphans[ r2uid ] ) {
mOrphans.remove( r2uid );
if ( i != incidence ) tempList.append( i );
@@ -487,7 +489,7 @@ void Calendar::removeRelations( Incidence *incidence )
// This incidence is located in the orphans list - it should be removed
if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
// Removing wasn't that easy
- for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
+ for( Q3DictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
if( it.current()->uid() == uid ) {
mOrphans.remove( it.currentKey() );
break;