-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 | |||
@@ -27,4 +27,6 @@ | |||
27 | #include "incidence.h" | 27 | #include "incidence.h" |
28 | #include "todo.h" | 28 | #include "todo.h" |
29 | //Added by qt3to4: | ||
30 | #include <Q3PtrList> | ||
29 | 31 | ||
30 | using namespace KCal; | 32 | using namespace KCal; |
@@ -60,5 +62,5 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) | |||
60 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; | 62 | // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; |
61 | mExDates = i.mExDates; | 63 | mExDates = i.mExDates; |
62 | QPtrListIterator<Attachment> itat( i.mAttachments ); | 64 | Q3PtrListIterator<Attachment> itat( i.mAttachments ); |
63 | Attachment *at; | 65 | Attachment *at; |
64 | while( (at = itat.current()) ) { | 66 | while( (at = itat.current()) ) { |
@@ -74,5 +76,5 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) | |||
74 | mCancelled = i.mCancelled; | 76 | mCancelled = i.mCancelled; |
75 | mHasStartDate = i.mHasStartDate; | 77 | mHasStartDate = i.mHasStartDate; |
76 | QPtrListIterator<Alarm> it( i.mAlarms ); | 78 | Q3PtrListIterator<Alarm> it( i.mAlarms ); |
77 | const Alarm *a; | 79 | const Alarm *a; |
78 | while( (a = it.current()) ) { | 80 | while( (a = it.current()) ) { |
@@ -99,5 +101,5 @@ Incidence::~Incidence() | |||
99 | 101 | ||
100 | Incidence *ev; | 102 | Incidence *ev; |
101 | QPtrList<Incidence> Relations = relations(); | 103 | Q3PtrList<Incidence> Relations = relations(); |
102 | for (ev=Relations.first();ev;ev=Relations.next()) { | 104 | for (ev=Relations.first();ev;ev=Relations.next()) { |
103 | if (ev->relatedTo() == this) ev->setRelatedTo(0); | 105 | if (ev->relatedTo() == this) ev->setRelatedTo(0); |
@@ -217,6 +219,6 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) | |||
217 | } | 219 | } |
218 | #if 0 | 220 | #if 0 |
219 | QPtrListIterator<Alarm> a1( i1.alarms() ); | 221 | Q3PtrListIterator<Alarm> a1( i1.alarms() ); |
220 | QPtrListIterator<Alarm> a2( i2.alarms() ); | 222 | Q3PtrListIterator<Alarm> a2( i2.alarms() ); |
221 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { | 223 | for( ; a1.current() && a2.current(); ++a1, ++a2 ) { |
222 | if( *a1.current() == *a2.current() ) { | 224 | if( *a1.current() == *a2.current() ) { |
@@ -323,5 +325,5 @@ void Incidence::cloneRelations( Incidence * newInc ) | |||
323 | Incidence * inc; | 325 | Incidence * inc; |
324 | Incidence * cloneInc; | 326 | Incidence * cloneInc; |
325 | QPtrList<Incidence> Relations = relations(); | 327 | Q3PtrList<Incidence> Relations = relations(); |
326 | for (inc=Relations.first();inc;inc=Relations.next()) { | 328 | for (inc=Relations.first();inc;inc=Relations.next()) { |
327 | cloneInc = inc->clone(); | 329 | cloneInc = inc->clone(); |
@@ -357,5 +359,5 @@ QDateTime Incidence::lastModifiedSub() | |||
357 | mLastModifiedSub = lastModified(); | 359 | mLastModifiedSub = lastModified(); |
358 | Incidence * inc; | 360 | Incidence * inc; |
359 | QPtrList<Incidence> Relations = relations(); | 361 | Q3PtrList<Incidence> Relations = relations(); |
360 | for (inc=Relations.first();inc;inc=Relations.next()) { | 362 | for (inc=Relations.first();inc;inc=Relations.next()) { |
361 | if ( inc->lastModifiedSub() > mLastModifiedSub ) | 363 | if ( inc->lastModifiedSub() > mLastModifiedSub ) |
@@ -448,5 +450,5 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations | |||
448 | if ( addToRelations ) { | 450 | if ( addToRelations ) { |
449 | Incidence * inc; | 451 | Incidence * inc; |
450 | QPtrList<Incidence> Relations = relations(); | 452 | Q3PtrList<Incidence> Relations = relations(); |
451 | for (inc=Relations.first();inc;inc=Relations.next()) { | 453 | for (inc=Relations.first();inc;inc=Relations.next()) { |
452 | inc->addCategories( categories, true ); | 454 | inc->addCategories( categories, true ); |
@@ -463,5 +465,5 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation | |||
463 | if ( setForRelations ) { | 465 | if ( setForRelations ) { |
464 | Incidence * inc; | 466 | Incidence * inc; |
465 | QPtrList<Incidence> Relations = relations(); | 467 | Q3PtrList<Incidence> Relations = relations(); |
466 | for (inc=Relations.first();inc;inc=Relations.next()) { | 468 | for (inc=Relations.first();inc;inc=Relations.next()) { |
467 | inc->setCategories( categories, true ); | 469 | inc->setCategories( categories, true ); |
@@ -551,13 +553,13 @@ Incidence *Incidence::relatedTo() const | |||
551 | } | 553 | } |
552 | 554 | ||
553 | QPtrList<Incidence> Incidence::relations() const | 555 | Q3PtrList<Incidence> Incidence::relations() const |
554 | { | 556 | { |
555 | return mRelations; | 557 | return mRelations; |
556 | } | 558 | } |
557 | 559 | ||
558 | void Incidence::addRelationsToList(QPtrList<Incidence> *rel) | 560 | void Incidence::addRelationsToList(Q3PtrList<Incidence> *rel) |
559 | { | 561 | { |
560 | Incidence* inc; | 562 | Incidence* inc; |
561 | QPtrList<Incidence> Relations = relations(); | 563 | Q3PtrList<Incidence> Relations = relations(); |
562 | for (inc=Relations.first();inc;inc=Relations.next()) { | 564 | for (inc=Relations.first();inc;inc=Relations.next()) { |
563 | inc->addRelationsToList( rel ); | 565 | inc->addRelationsToList( rel ); |
@@ -648,13 +650,13 @@ void Incidence::deleteAttachments(const QString& mime) | |||
648 | } | 650 | } |
649 | 651 | ||
650 | QPtrList<Attachment> Incidence::attachments() const | 652 | Q3PtrList<Attachment> Incidence::attachments() const |
651 | { | 653 | { |
652 | return mAttachments; | 654 | return mAttachments; |
653 | } | 655 | } |
654 | 656 | ||
655 | QPtrList<Attachment> Incidence::attachments(const QString& mime) const | 657 | Q3PtrList<Attachment> Incidence::attachments(const QString& mime) const |
656 | { | 658 | { |
657 | QPtrList<Attachment> attachments; | 659 | Q3PtrList<Attachment> attachments; |
658 | QPtrListIterator<Attachment> it( mAttachments ); | 660 | Q3PtrListIterator<Attachment> it( mAttachments ); |
659 | Attachment *at; | 661 | Attachment *at; |
660 | while ( (at = it.current()) ) { | 662 | while ( (at = it.current()) ) { |
@@ -738,5 +740,5 @@ QStringList Incidence::secrecyList() | |||
738 | 740 | ||
739 | 741 | ||
740 | QPtrList<Alarm> Incidence::alarms() const | 742 | Q3PtrList<Alarm> Incidence::alarms() const |
741 | { | 743 | { |
742 | return mAlarms; | 744 | return mAlarms; |
@@ -772,5 +774,5 @@ bool Incidence::isAlarmEnabled() const | |||
772 | { | 774 | { |
773 | Alarm* alarm; | 775 | Alarm* alarm; |
774 | for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { | 776 | for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { |
775 | if (alarm->enabled()) | 777 | if (alarm->enabled()) |
776 | return true; | 778 | return true; |