-rw-r--r-- | libkcal/incidence.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 7dd9bd2..8fcdc69 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -25,8 +25,10 @@ #include "calformat.h" #include "incidence.h" #include "todo.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; Incidence::Incidence() : @@ -58,9 +60,9 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mRelatedTo = 0; mRelatedToUid = i.mRelatedToUid; // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; mExDates = i.mExDates; - QPtrListIterator<Attachment> itat( i.mAttachments ); + Q3PtrListIterator<Attachment> itat( i.mAttachments ); Attachment *at; while( (at = itat.current()) ) { Attachment *a = new Attachment( *at ); mAttachments.append( a ); @@ -72,9 +74,9 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mPriority = i.mPriority; mLocation = i.mLocation; mCancelled = i.mCancelled; mHasStartDate = i.mHasStartDate; - QPtrListIterator<Alarm> it( i.mAlarms ); + Q3PtrListIterator<Alarm> it( i.mAlarms ); const Alarm *a; while( (a = it.current()) ) { Alarm *b = new Alarm( *a ); b->setParent( this ); @@ -97,9 +99,9 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) Incidence::~Incidence() { Incidence *ev; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (ev=Relations.first();ev;ev=Relations.next()) { if (ev->relatedTo() == this) ev->setRelatedTo(0); } if (relatedTo()) relatedTo()->removeRelation(this); @@ -215,10 +217,10 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) return false; } } #if 0 - QPtrListIterator<Alarm> a1( i1.alarms() ); - QPtrListIterator<Alarm> a2( i2.alarms() ); + Q3PtrListIterator<Alarm> a1( i1.alarms() ); + Q3PtrListIterator<Alarm> a2( i2.alarms() ); for( ; a1.current() && a2.current(); ++a1, ++a2 ) { if( *a1.current() == *a2.current() ) { continue; } @@ -321,9 +323,9 @@ void Incidence::cloneRelations( Incidence * newInc ) { // newInc is already a clone of this incidence Incidence * inc; Incidence * cloneInc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { cloneInc = inc->clone(); cloneInc->recreate(); cloneInc->setRelatedTo( newInc ); @@ -355,9 +357,9 @@ QDateTime Incidence::lastModifiedSub() if ( mLastModifiedSub.isValid() ) return mLastModifiedSub; mLastModifiedSub = lastModified(); Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { if ( inc->lastModifiedSub() > mLastModifiedSub ) mLastModifiedSub = inc->lastModifiedSub(); } @@ -446,9 +448,9 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations checkCategories(); updated(); if ( addToRelations ) { Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->addCategories( categories, true ); } } @@ -461,9 +463,9 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation checkCategories(); updated(); if ( setForRelations ) { Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->setCategories( categories, true ); } } @@ -549,17 +551,17 @@ Incidence *Incidence::relatedTo() const { return mRelatedTo; } -QPtrList<Incidence> Incidence::relations() const +Q3PtrList<Incidence> Incidence::relations() const { return mRelations; } -void Incidence::addRelationsToList(QPtrList<Incidence> *rel) +void Incidence::addRelationsToList(Q3PtrList<Incidence> *rel) { Incidence* inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->addRelationsToList( rel ); } if ( rel->findRef( this ) == -1 ) @@ -646,17 +648,17 @@ void Incidence::deleteAttachments(const QString& mime) at = mAttachments.next(); } } -QPtrList<Attachment> Incidence::attachments() const +Q3PtrList<Attachment> Incidence::attachments() const { return mAttachments; } -QPtrList<Attachment> Incidence::attachments(const QString& mime) const +Q3PtrList<Attachment> Incidence::attachments(const QString& mime) const { - QPtrList<Attachment> attachments; - QPtrListIterator<Attachment> it( mAttachments ); + Q3PtrList<Attachment> attachments; + Q3PtrListIterator<Attachment> it( mAttachments ); Attachment *at; while ( (at = it.current()) ) { if (at->mimeType() == mime) attachments.append(at); @@ -736,9 +738,9 @@ QStringList Incidence::secrecyList() return list; } -QPtrList<Alarm> Incidence::alarms() const +Q3PtrList<Alarm> Incidence::alarms() const { return mAlarms; } @@ -770,9 +772,9 @@ void Incidence::clearAlarms() bool Incidence::isAlarmEnabled() const { Alarm* alarm; - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) return true; } return false; |