From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'libkcal') diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index 3157214..3c4a81c 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp @@ -26,6 +26,8 @@ #include "todo.h" #include "alarm.h" +//Added by qt3to4: +#include using namespace KCal; #include @@ -212,7 +214,7 @@ QString Alarm::programArguments() const } void Alarm::setEmailAlarm(const QString &subject, const QString &text, - const QValueList &addressees, const QStringList &attachments) + const Q3ValueList &addressees, const QStringList &attachments) { mType = Email; mMailSubject = subject; @@ -231,7 +233,7 @@ void Alarm::setMailAddress(const Person &mailAddress) } } -void Alarm::setMailAddresses(const QValueList &mailAddresses) +void Alarm::setMailAddresses(const Q3ValueList &mailAddresses) { if (mType == Email) { mMailAddresses = mailAddresses; @@ -247,9 +249,9 @@ void Alarm::addMailAddress(const Person &mailAddress) } } -QValueList Alarm::mailAddresses() const +Q3ValueList Alarm::mailAddresses() const { - return (mType == Email) ? mMailAddresses : QValueList(); + return (mType == Email) ? mMailAddresses : Q3ValueList(); } void Alarm::setMailSubject(const QString &mailAlarmSubject) diff --git a/libkcal/alarm.h b/libkcal/alarm.h index ac6ea0d..b24f0f7 100644 --- a/libkcal/alarm.h +++ b/libkcal/alarm.h @@ -22,7 +22,7 @@ #define KCAL_ALARM_H #include -#include +#include #include "customproperties.h" #include "duration.h" @@ -39,7 +39,7 @@ class Alarm : public CustomProperties { public: enum Type { Invalid, Display, Procedure, Email, Audio }; - typedef QValueList List; + typedef Q3ValueList List; /** Construct a new alarm with variables initialized to "sane" values. */ explicit Alarm(Incidence *parent); @@ -112,7 +112,7 @@ class Alarm : public CustomProperties @param addressees email addresses of recipient(s). @param attachments optional names of files to attach to the email. */ - void setEmailAlarm(const QString &subject, const QString &text, const QValueList &addressees, + void setEmailAlarm(const QString &subject, const QString &text, const Q3ValueList &addressees, const QStringList &attachments = QStringList()); /** Send mail to this address when the alarm is triggered. @@ -122,13 +122,13 @@ class Alarm : public CustomProperties /** Send mail to these addresses when the alarm is triggered. Ignored if the alarm is not an email alarm. */ - void setMailAddresses(const QValueList &mailAlarmAddresses); + void setMailAddresses(const Q3ValueList &mailAlarmAddresses); /** Add this address to the list of addresses to send mail to when the alarm is triggered. Ignored if the alarm is not an email alarm. */ void addMailAddress(const Person &mailAlarmAddress); /** return the addresses to send mail to when an alarm goes off */ - QValueList mailAddresses() const; + Q3ValueList mailAddresses() const; /** Set the subject line of the mail. Ignored if the alarm is not an email alarm. @@ -226,7 +226,7 @@ class Alarm : public CustomProperties QString mDescription; // text to display/email body/procedure arguments QString mFile; // procedure program to run/optional audio file to play QStringList mMailAttachFiles; // filenames to attach to email - QValueList mMailAddresses; // who to mail for reminder + Q3ValueList mMailAddresses; // who to mail for reminder QString mMailSubject; // subject of email int mAlarmSnoozeTime; // number of minutes after alarm to 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 using namespace KCal; @@ -271,19 +273,19 @@ CalFilter *Calendar::filter() return mFilter; } -QPtrList Calendar::incidences() +Q3PtrList Calendar::incidences() { - QPtrList incidences; + Q3PtrList incidences; Incidence *i; - QPtrList e = events(); + Q3PtrList e = events(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList t = todos(); + Q3PtrList t = todos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList j = journals(); + Q3PtrList j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); return incidences; @@ -291,77 +293,77 @@ QPtrList Calendar::incidences() void Calendar::resetPilotStat(int id ) { - QPtrList incidences; + Q3PtrList incidences; Incidence *i; - QPtrList e = rawEvents(); + Q3PtrList e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); - QPtrList t = rawTodos(); + Q3PtrList t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); - QPtrList j = journals(); + Q3PtrList j = journals(); for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); } void Calendar::resetTempSyncStat() { - QPtrList incidences; + Q3PtrList incidences; Incidence *i; - QPtrList e = rawEvents(); + Q3PtrList e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList t = rawTodos(); + Q3PtrList t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList j = journals(); + Q3PtrList j = journals(); for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); } -QPtrList Calendar::rawIncidences() +Q3PtrList Calendar::rawIncidences() { - QPtrList incidences; + Q3PtrList incidences; Incidence *i; - QPtrList e = rawEvents(); + Q3PtrList e = rawEvents(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList t = rawTodos(); + Q3PtrList t = rawTodos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList j = journals(); + Q3PtrList j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); return incidences; } -QPtrList Calendar::events( const QDate &date, bool sorted ) +Q3PtrList Calendar::events( const QDate &date, bool sorted ) { - QPtrList el = rawEventsForDate(date,sorted); + Q3PtrList el = rawEventsForDate(date,sorted); mFilter->apply(&el); return el; } -QPtrList Calendar::events( const QDateTime &qdt ) +Q3PtrList Calendar::events( const QDateTime &qdt ) { - QPtrList el = rawEventsForDate(qdt); + Q3PtrList el = rawEventsForDate(qdt); mFilter->apply(&el); return el; } -QPtrList Calendar::events( const QDate &start, const QDate &end, +Q3PtrList Calendar::events( const QDate &start, const QDate &end, bool inclusive) { - QPtrList el = rawEvents(start,end,inclusive); + Q3PtrList el = rawEvents(start,end,inclusive); mFilter->apply(&el); return el; } -QPtrList Calendar::events() +Q3PtrList Calendar::events() { - QPtrList el = rawEvents(); + Q3PtrList el = rawEvents(); mFilter->apply(&el); return el; } @@ -369,7 +371,7 @@ void Calendar::addIncidenceBranch(Incidence *i) { addIncidence( i ); Incidence * inc; - QPtrList Relations = i->relations(); + Q3PtrList 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 Calendar::todos() +Q3PtrList Calendar::todos() { - QPtrList tl = rawTodos(); + Q3PtrList tl = rawTodos(); mFilter->apply( &tl ); return tl; } @@ -455,7 +457,7 @@ void Calendar::removeRelations( Incidence *incidence ) // qDebug("Calendar::removeRelations "); QString uid = incidence->uid(); - QPtrList relations = incidence->relations(); + Q3PtrList 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 tempList; + Q3PtrList 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 it( mOrphans ); it.current(); ++it ) { + for( Q3DictIterator it( mOrphans ); it.current(); ++it ) { if( it.current()->uid() == uid ) { mOrphans.remove( it.currentKey() ); break; diff --git a/libkcal/calendar.h b/libkcal/calendar.h index fbc40ad..5845f44 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -25,8 +25,8 @@ #include #include #include -#include -#include +#include +#include #include "customproperties.h" #include "event.h" @@ -88,7 +88,7 @@ public: Sync changes in memory to persistant storage. */ virtual void save() = 0; - virtual QPtrList getExternLastSyncEvents() = 0; + virtual Q3PtrList getExternLastSyncEvents() = 0; virtual void removeSyncInfo( QString syncProfile) = 0; virtual bool isSaving() { return false; } @@ -155,12 +155,12 @@ public: /** Return filtered list of all incidences of this calendar. */ - virtual QPtrList incidences(); + virtual Q3PtrList incidences(); /** Return unfiltered list of all incidences of this calendar. */ - virtual QPtrList rawIncidences(); + virtual Q3PtrList rawIncidences(); /** Adds a Event to this calendar object. @@ -185,27 +185,27 @@ public: date specified. useful for dayView, etc. etc. The calendar filter is applied. */ - QPtrList events( const QDate &date, bool sorted = false); + Q3PtrList events( const QDate &date, bool sorted = false); /** Get events, which occur on the given date. The calendar filter is applied. */ - QPtrList events( const QDateTime &qdt ); + Q3PtrList events( const QDateTime &qdt ); /** Get events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. The calendar filter is applied. */ - QPtrList events( const QDate &start, const QDate &end, + Q3PtrList events( const QDate &start, const QDate &end, bool inclusive = false); /** Return filtered list of all events in calendar. */ - virtual QPtrList events(); + virtual Q3PtrList events(); /** Return unfiltered list of all events in calendar. */ - virtual QPtrList rawEvents() = 0; + virtual Q3PtrList rawEvents() = 0; /** Add a todo to the todolist. @@ -222,7 +222,7 @@ public: /** Return filterd list of todos. */ - virtual QPtrList todos(); + virtual Q3PtrList todos(); /** Searches todolist for an event with this unique string identifier, returns a pointer or null. @@ -232,11 +232,11 @@ public: /** Returns list of todos due on the specified date. */ - virtual QPtrList todos( const QDate &date ) = 0; + virtual Q3PtrList todos( const QDate &date ) = 0; /** Return unfiltered list of todos. */ - virtual QPtrList rawTodos() = 0; + virtual Q3PtrList rawTodos() = 0; /** Add a Journal entry to calendar. @@ -248,7 +248,7 @@ public: Return Journal for given date. */ virtual Journal *journal( const QDate & ) = 0; - virtual QPtrList journals4Date( const QDate & ) = 0; + virtual Q3PtrList journals4Date( const QDate & ) = 0; /** Return Journal with given UID. */ @@ -256,7 +256,7 @@ public: /** Return list of all Journal entries. */ - virtual QPtrList journals() = 0; + virtual Q3PtrList journals() = 0; /** Searches all incidence types for an incidence with this unique @@ -335,17 +335,17 @@ public: /** Get unfiltered events, which occur on the given date. */ - virtual QPtrList rawEventsForDate( const QDateTime &qdt ) = 0; + virtual Q3PtrList rawEventsForDate( const QDateTime &qdt ) = 0; /** Get unfiltered events, which occur on the given date. */ - virtual QPtrList rawEventsForDate( const QDate &date, + virtual Q3PtrList rawEventsForDate( const QDate &date, bool sorted = false ) = 0; /** Get events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. */ - virtual QPtrList rawEvents( const QDate &start, const QDate &end, + virtual Q3PtrList rawEvents( const QDate &start, const QDate &end, bool inclusive = false ) = 0; Incidence *mNextAlarmIncidence; @@ -376,8 +376,8 @@ private: QString mLoadedProductId; // This list is used to put together related todos - QDict mOrphans; - QDict mOrphanUids; + Q3Dict mOrphans; + Q3Dict mOrphanUids; }; } 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 #include -#include +#include #include #include @@ -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 localInc = rawIncidences(); + Q3PtrList 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 er = remote->rawIncidences(); + Q3PtrList 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 incList; + Q3PtrList incList; { - QPtrList EventList = cal->rawEvents(); + Q3PtrList 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 TodoList = cal->rawTodos(); + Q3PtrList TodoList = cal->rawTodos(); Todo * ev = TodoList.first(); while ( ev ) { ev->resetRelatedTo(); @@ -299,7 +299,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) } } { - QPtrList JournalList = cal->journals(); + Q3PtrList 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 CalendarLocal::rawTodos() +Q3PtrList CalendarLocal::rawTodos() { - QPtrList el; + Q3PtrList 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 all = rawIncidences() ; + Q3PtrList all = rawIncidences() ; Incidence *inc; for ( inc = all.first(); inc; inc = all.next() ) { inc->removeID( syncProfile ); } if ( syncProfile.isEmpty() ) { - QPtrList el; + Q3PtrList 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 CalendarLocal::getExternLastSyncEvents() +Q3PtrList CalendarLocal::getExternLastSyncEvents() { - QPtrList el; + Q3PtrList 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 CalendarLocal::todos( const QDate &date ) +Q3PtrList CalendarLocal::todos( const QDate &date ) { - QPtrList todos; + Q3PtrList 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 alarmList = incidence->alarms(); + Q3PtrList 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 alarmList = incidence->alarms(); + Q3PtrList 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 CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) +Q3PtrList CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) { - QPtrList eventList; + Q3PtrList eventList; Event *event; for( event = mEventList.first(); event; event = mEventList.next() ) { @@ -878,7 +878,7 @@ QPtrList 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 eventListSorted; + Q3PtrList eventListSorted; Event *sortEvent; for ( event = eventList.first(); event; event = eventList.next() ) { sortEvent = eventListSorted.first(); @@ -894,12 +894,12 @@ QPtrList CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) } -QPtrList CalendarLocal::rawEvents( const QDate &start, const QDate &end, +Q3PtrList CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool inclusive ) { Event *event = 0; - QPtrList eventList; + Q3PtrList eventList; // Get non-recurring events for( event = mEventList.first(); event; event = mEventList.next() ) { @@ -923,7 +923,7 @@ QPtrList 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 CalendarLocal::rawEvents( const QDate &start, const QDate &end, return eventList; } -QPtrList CalendarLocal::rawEventsForDate( const QDateTime &qdt ) +Q3PtrList CalendarLocal::rawEventsForDate( const QDateTime &qdt ) { return rawEventsForDate( qdt.date() ); } -QPtrList CalendarLocal::rawEvents() +Q3PtrList CalendarLocal::rawEvents() { - QPtrList el; + Q3PtrList 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 CalendarLocal::journals4Date( const QDate & date ) +Q3PtrList CalendarLocal::journals4Date( const QDate & date ) { - QPtrList el; + Q3PtrList 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 CalendarLocal::journals() +Q3PtrList CalendarLocal::journals() { - QPtrList el; + Q3PtrList 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 EventList = mEventList; + Q3PtrList 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 TodoList = mTodoList; + Q3PtrList TodoList = mTodoList; Todo * ev = TodoList.first(); while ( ev ) { if ( ev->calID() == id ) @@ -1070,7 +1070,7 @@ void CalendarLocal::setCalendarRemove( int id ) } } { - QPtrList JournalList = mJournalList; + Q3PtrList JournalList = mJournalList; Journal * ev = JournalList.first(); while ( ev ) { if ( ev->calID() == id ) diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 1ceabce..1df65c7 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -23,6 +23,8 @@ #define KCAL_CALENDARLOCAL_H #include "calendar.h" +//Added by qt3to4: +#include namespace KCal { @@ -93,8 +95,8 @@ class CalendarLocal : public Calendar /** Return unfiltered list of all events in calendar. */ - QPtrList rawEvents(); - QPtrList getExternLastSyncEvents(); + Q3PtrList rawEvents(); + Q3PtrList getExternLastSyncEvents(); /** Add a todo to the todolist. */ @@ -112,17 +114,17 @@ class CalendarLocal : public Calendar /** Return list of all todos. */ - QPtrList rawTodos(); + Q3PtrList rawTodos(); /** Returns list of todos due on the specified date. */ - QPtrList todos( const QDate &date ); + Q3PtrList todos( const QDate &date ); /** Return list of all todos. Workaround because compiler does not recognize function of base class. */ - QPtrList todos() { return Calendar::todos(); } + Q3PtrList todos() { return Calendar::todos(); } /** Add a Journal entry to calendar. @@ -136,7 +138,7 @@ class CalendarLocal : public Calendar Return Journal for given date. */ Journal *journal( const QDate & ); - QPtrList journals4Date( const QDate & ); + Q3PtrList journals4Date( const QDate & ); /** Return Journal with given UID. */ @@ -144,7 +146,7 @@ class CalendarLocal : public Calendar /** Return list of all Journals stored in calendar. */ - QPtrList journals(); + Q3PtrList journals(); /** Return all alarms, which ocur in the given time interval. @@ -174,16 +176,16 @@ class CalendarLocal : public Calendar Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. */ - QPtrList rawEventsForDate( const QDate &date, bool sorted = false ); + Q3PtrList rawEventsForDate( const QDate &date, bool sorted = false ); /** Get unfiltered events for date \a qdt. */ - QPtrList rawEventsForDate( const QDateTime &qdt ); + Q3PtrList rawEventsForDate( const QDateTime &qdt ); /** Get unfiltered events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. */ - QPtrList rawEvents( const QDate &start, const QDate &end, + Q3PtrList rawEvents( const QDate &start, const QDate &end, bool inclusive = false ); Todo *todo( QString, QString ); Event *event( QString, QString ); @@ -224,9 +226,9 @@ public slots: private: void init(); - QPtrList mEventList; - QPtrList mTodoList; - QPtrList mJournalList; + Q3PtrList mEventList; + Q3PtrList mTodoList; + Q3PtrList mJournalList; }; } diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp index 72f70c2..fa1dbd5 100644 --- a/libkcal/calfilter.cpp +++ b/libkcal/calfilter.cpp @@ -21,6 +21,8 @@ #include #include "calfilter.h" +//Added by qt3to4: +#include using namespace KCal; @@ -41,7 +43,7 @@ CalFilter::~CalFilter() { } -void CalFilter::apply(QPtrList *eventlist) +void CalFilter::apply(Q3PtrList *eventlist) { if (!mEnabled) return; @@ -61,7 +63,7 @@ void CalFilter::apply(QPtrList *eventlist) } // TODO: avoid duplicating apply() code -void CalFilter::apply(QPtrList *eventlist) +void CalFilter::apply(Q3PtrList *eventlist) { if (!mEnabled) return; Todo *event = eventlist->first(); diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index e349770..821149f 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h @@ -22,7 +22,7 @@ #define _CALFILTER_H #include -#include +#include #include "event.h" #include "todo.h" @@ -55,15 +55,15 @@ class CalFilter { Apply filter to eventlist, all events not matching filter criterias are removed from the list. */ - void apply(QPtrList *eventlist); + void apply(Q3PtrList *eventlist); /** Apply filter to todolist, all todos not matching filter criterias are removed from the list. */ - void apply(QPtrList *todolist); - bool CalFilter::filterCalendarItem(Incidence *in); - bool CalFilter::filterJournal(Journal *in); + void apply(Q3PtrList *todolist); + bool filterCalendarItem(Incidence *in); + bool filterJournal(Journal *in); /** Apply filter criteria on the specified event. Return true, if event passes criteria, otherwise return false. diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index adc1710..16f4a28 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp @@ -19,6 +19,8 @@ */ #include "customproperties.h" +//Added by qt3to4: +#include using namespace KCal; @@ -35,52 +37,52 @@ CustomProperties::~CustomProperties() { } -void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, +void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value) { if (value.isNull() || key.isEmpty() || app.isEmpty()) return; - QCString property = "X-KDE-" + app + "-" + key; + Q3CString property = "X-KDE-" + app + "-" + key; if (!checkName(property)) return; mProperties[property] = value; } -void CustomProperties::removeCustomProperty(const QCString &app, const QCString &key) +void CustomProperties::removeCustomProperty(const Q3CString &app, const Q3CString &key) { - removeNonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); + removeNonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); } -QString CustomProperties::customProperty(const QCString &app, const QCString &key) const +QString CustomProperties::customProperty(const Q3CString &app, const Q3CString &key) const { - return nonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); + return nonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); } -void CustomProperties::setNonKDECustomProperty(const QCString &name, const QString &value) +void CustomProperties::setNonKDECustomProperty(const Q3CString &name, const QString &value) { if (value.isNull() || !checkName(name)) return; mProperties[name] = value; } -void CustomProperties::removeNonKDECustomProperty(const QCString &name) +void CustomProperties::removeNonKDECustomProperty(const Q3CString &name) { - QMap::Iterator it = mProperties.find(name); + QMap::Iterator it = mProperties.find(name); if (it != mProperties.end()) mProperties.remove(it); } -QString CustomProperties::nonKDECustomProperty(const QCString &name) const +QString CustomProperties::nonKDECustomProperty(const Q3CString &name) const { - QMap::ConstIterator it = mProperties.find(name); + QMap::ConstIterator it = mProperties.find(name); if (it == mProperties.end()) return QString::null; return it.data(); } -void CustomProperties::setCustomProperties(const QMap &properties) +void CustomProperties::setCustomProperties(const QMap &properties) { - for (QMap::ConstIterator it = properties.begin(); it != properties.end(); ++it) { + for (QMap::ConstIterator it = properties.begin(); it != properties.end(); ++it) { // Validate the property name and convert any null string to empty string if (checkName(it.key())) { mProperties[it.key()] = it.data().isNull() ? QString("") : it.data(); @@ -88,12 +90,12 @@ void CustomProperties::setCustomProperties(const QMap &proper } } -QMap CustomProperties::customProperties() const +QMap CustomProperties::customProperties() const { return mProperties; } -bool CustomProperties::checkName(const QCString &name) +bool CustomProperties::checkName(const Q3CString &name) { // Check that the property name starts with 'X-' and contains // only the permitted characters diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h index 0cbfdcd..75eb3ad 100644 --- a/libkcal/customproperties.h +++ b/libkcal/customproperties.h @@ -23,6 +23,8 @@ #include #include +//Added by qt3to4: +#include namespace KCal { @@ -49,47 +51,47 @@ class CustomProperties @param value The property's value. A call with a value of QString::null will be ignored. */ - void setCustomProperty(const QCString &app, const QCString &key, + void setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value); /** Delete a custom calendar property. @param app Application name as it appears in the custom property name. @param key Property identifier specific to the application. */ - void removeCustomProperty(const QCString &app, const QCString &key); + void removeCustomProperty(const Q3CString &app, const Q3CString &key); /** Return the value of a custom calendar property. @param app Application name as it appears in the custom property name. @param key Property identifier specific to the application. @return Property value, or QString::null if (and only if) the property does not exist. */ - QString customProperty(const QCString &app, const QCString &key) const; + QString customProperty(const Q3CString &app, const Q3CString &key) const; /** Create or modify a non-KDE or non-standard custom calendar property. @param name Full property name @param value The property's value. A call with a value of QString::null will be ignored. */ - void setNonKDECustomProperty(const QCString &name, const QString &value); + void setNonKDECustomProperty(const Q3CString &name, const QString &value); /** Delete a non-KDE or non-standard custom calendar property. @param name Full property name */ - void removeNonKDECustomProperty(const QCString &name); + void removeNonKDECustomProperty(const Q3CString &name); /** Return the value of a non-KDE or non-standard custom calendar property. @param name Full property name @return Property value, or QString::null if (and only if) the property does not exist. */ - QString nonKDECustomProperty(const QCString& name) const; + QString nonKDECustomProperty(const Q3CString& name) const; /** Initialise the alarm's custom calendar properties to the specified key/value pairs. */ - void setCustomProperties(const QMap &properties); + void setCustomProperties(const QMap &properties); /** Return all custom calendar property key/value pairs. */ - QMap customProperties() const; + QMap customProperties() const; private: - static bool checkName(const QCString& name); + static bool checkName(const Q3CString& name); - QMap mProperties; // custom calendar properties + QMap mProperties; // custom calendar properties }; } diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp index cdcfae4..ca7e212 100644 --- a/libkcal/dndfactory.cpp +++ b/libkcal/dndfactory.cpp @@ -22,6 +22,9 @@ #include #include +//Added by qt3to4: +#include +#include #include #include @@ -68,7 +71,7 @@ Event *DndFactory::createDrop(QDropEvent *de) if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { de->accept(); - QPtrList events = cal.events(); + Q3PtrList events = cal.events(); if ( !events.isEmpty() ) { Event *event = new Event( *events.first() ); return event; @@ -87,7 +90,7 @@ Todo *DndFactory::createDropTodo(QDropEvent *de) if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { de->accept(); - QPtrList todos = cal.todos(); + Q3PtrList todos = cal.todos(); if ( !todos.isEmpty() ) { Todo *todo = new Todo( *todos.first() ); return todo; @@ -133,7 +136,7 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime return 0; } - QPtrList incList = cal.incidences(); + Q3PtrList incList = cal.incidences(); Incidence *inc = incList.first(); if ( !incList.isEmpty() && inc ) { diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h index 2df5259..a873c37 100644 --- a/libkcal/dndfactory.h +++ b/libkcal/dndfactory.h @@ -1,3 +1,5 @@ +//Added by qt3to4: +#include /* This file is part of libkcal. diff --git a/libkcal/dndfactory_dummy.h b/libkcal/dndfactory_dummy.h index 44cc114..3ab6adf 100644 --- a/libkcal/dndfactory_dummy.h +++ b/libkcal/dndfactory_dummy.h @@ -25,6 +25,8 @@ #define KCAL_DNDFACTORY_H #include "vcalformat.h" +//Added by qt3to4: +#include class QDropEvent; diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp index ae40e6d..73eb3d0 100644 --- a/libkcal/dummyscheduler.cpp +++ b/libkcal/dummyscheduler.cpp @@ -23,7 +23,9 @@ // #include -#include +#include +//Added by qt3to4: +#include #include @@ -68,8 +70,8 @@ bool DummyScheduler::performTransaction(IncidenceBase *incidence,Method method) bool DummyScheduler::saveMessage(const QString &message) { QFile f("dummyscheduler.store"); - if (f.open(IO_WriteOnly | IO_Append)) { - QTextStream t(&f); + if (f.open(QIODevice::WriteOnly | QIODevice::Append)) { + Q3TextStream t(&f); t << message << endl; f.close(); return true; @@ -78,16 +80,16 @@ bool DummyScheduler::saveMessage(const QString &message) } } -QPtrList DummyScheduler::retrieveTransactions() +Q3PtrList DummyScheduler::retrieveTransactions() { - QPtrList messageList; + Q3PtrList messageList; QFile f("dummyscheduler.store"); - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file" << endl; } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString; QString messageLine = t.readLine(); while (!messageLine.isNull()) { diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h index df42153..f86d583 100644 --- a/libkcal/dummyscheduler.h +++ b/libkcal/dummyscheduler.h @@ -24,6 +24,8 @@ // #include "scheduler.h" +//Added by qt3to4: +#include namespace KCal { @@ -39,7 +41,7 @@ class DummyScheduler : public Scheduler { bool publish (IncidenceBase *incidence,const QString &recipients); bool performTransaction(IncidenceBase *incidence,Method method); bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients); - QPtrList retrieveTransactions(); + Q3PtrList retrieveTransactions(); protected: bool saveMessage(const QString &); diff --git a/libkcal/event.cpp b/libkcal/event.cpp index fdf5657..060df81 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -384,7 +384,7 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ // *ok = false; // return incidenceStart; // } - for (QPtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { if ( alarm->time() < alarmStart ) { diff --git a/libkcal/event.h b/libkcal/event.h index 6a58618..da44f81 100644 --- a/libkcal/event.h +++ b/libkcal/event.h @@ -25,6 +25,8 @@ // #include "incidence.h" +//Added by qt3to4: +#include namespace KCal { /** @@ -40,7 +42,7 @@ class Event : public Incidence ~Event(); bool matchTime(QDateTime*startDT, QDateTime* endDT); - QCString type() const { return "Event"; } + Q3CString type() const { return "Event"; } IncTypeID typeID() const { return eventID; } Incidence *clone(); diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp index a139124..3d1309f 100644 --- a/libkcal/filestorage.cpp +++ b/libkcal/filestorage.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp index ba15d6d..e4e9ec9 100644 --- a/libkcal/freebusy.cpp +++ b/libkcal/freebusy.cpp @@ -21,6 +21,9 @@ #include #include "freebusy.h" +//Added by qt3to4: +#include +#include using namespace KCal; @@ -43,7 +46,7 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime setDtEnd(end); //Gets all the events in the calendar - QPtrList eventList = mCalendar->events(); + Q3PtrList eventList = mCalendar->events(); Event *event; int extraDays, i, x, duration; @@ -113,7 +116,7 @@ QDateTime FreeBusy::dtEnd() const return mDtEnd; } -QValueList FreeBusy::busyPeriods() const +Q3ValueList FreeBusy::busyPeriods() const { return mBusyPeriods; } @@ -146,14 +149,14 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even return true; } -FreeBusy::FreeBusy(QValueList busyPeriods) +FreeBusy::FreeBusy(Q3ValueList busyPeriods) { mBusyPeriods = busyPeriods; } void FreeBusy::sortList() { - typedef QValueList PeriodList; + typedef Q3ValueList PeriodList; PeriodList::Iterator tmpPeriod, earlyPeriod; PeriodList sortedList; diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h index d741c72..bd14cb7 100644 --- a/libkcal/freebusy.h +++ b/libkcal/freebusy.h @@ -24,8 +24,10 @@ // #include -#include -#include +#include +#include +//Added by qt3to4: +#include #include "period.h" #include "calendar.h" @@ -43,17 +45,17 @@ class FreeBusy : public IncidenceBase FreeBusy(); FreeBusy(const QDateTime &start, const QDateTime &end); FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); - FreeBusy(QValueList busyPeriods); + FreeBusy(Q3ValueList busyPeriods); ~FreeBusy(); - QCString type() const { return "FreeBusy"; } + Q3CString type() const { return "FreeBusy"; } IncTypeID typeID() const { return freebusyID; } virtual QDateTime dtEnd() const; bool setDtEnd( const QDateTime &end ); - QValueList busyPeriods() const; + Q3ValueList busyPeriods() const; void addPeriod(const QDateTime &start, const QDateTime &end); void sortList(); @@ -64,7 +66,7 @@ class FreeBusy : public IncidenceBase bool addLocalPeriod(const QDateTime &start, const QDateTime &end); QDateTime mDtEnd; - QValueList mBusyPeriods; + Q3ValueList mBusyPeriods; Calendar *mCalendar; }; diff --git a/libkcal/icaldrag.cpp b/libkcal/icaldrag.cpp index 446a115..7f5a796 100644 --- a/libkcal/icaldrag.cpp +++ b/libkcal/icaldrag.cpp @@ -28,7 +28,7 @@ using namespace KCal; ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/calendar", parent, name ) + : Q3StoredDrag( "text/calendar", parent, name ) { ICalFormat icf; QString scal = icf.toString( cal ); diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h index fdf32b7..c1f73f4 100644 --- a/libkcal/icaldrag.h +++ b/libkcal/icaldrag.h @@ -22,13 +22,13 @@ #ifndef ICALDRAG_H #define ICALDRAG_H -#include +#include #include "calendar.h" namespace KCal { /** iCalendar drag&drop class. */ -class ICalDrag : public QStoredDrag +class ICalDrag : public Q3StoredDrag { public: /** Create a drag&drop object for iCalendar component \a ical. */ diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 6f3a799..3829bc1 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -20,11 +20,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include @@ -70,14 +70,14 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName) clearException(); QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { setException(new ErrorFormat(ErrorFormat::LoadError)); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); QString text; - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); text = ts.read(); file.close(); @@ -98,14 +98,14 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) // TODO: write backup file //is.restart(); QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, i18n("Could not open file '%1'").arg(fileName))); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); ts << text; file.close(); //qDebug("saving file takes ms: %d ", is.elapsed() ); @@ -156,15 +156,15 @@ Incidence *ICalFormat::fromString( const QString &text ) fromString(&cal, text); Incidence *ical = 0; - QPtrList elist = cal.events(); + Q3PtrList elist = cal.events(); if ( elist.count() > 0 ) { ical = elist.first(); } else { - QPtrList tlist = cal.todos(); + Q3PtrList tlist = cal.todos(); if ( tlist.count() > 0 ) { ical = tlist.first(); } else { - QPtrList jlist = cal.journals(); + Q3PtrList jlist = cal.journals(); if ( jlist.count() > 0 ) { ical = jlist.first(); } @@ -172,7 +172,7 @@ Incidence *ICalFormat::fromString( const QString &text ) } return ical; } -#include +#include QString ICalFormat::toString( Calendar *cal ) { @@ -184,8 +184,8 @@ QString ICalFormat::toString( Calendar *cal ) icalcomponent *component; // todos - QPtrList todoList = cal->rawTodos(); - QPtrListIterator qlt(todoList); + Q3PtrList todoList = cal->rawTodos(); + Q3PtrListIterator qlt(todoList); for (; qlt.current(); ++qlt) { component = mImpl->writeTodo(qlt.current()); icalcomponent_add_component(calendar,component); @@ -196,7 +196,7 @@ QString ICalFormat::toString( Calendar *cal ) } } // events - QPtrList events = cal->rawEvents(); + Q3PtrList events = cal->rawEvents(); Event *ev; for(ev=events.first();ev;ev=events.next()) { component = mImpl->writeEvent(ev); @@ -207,7 +207,7 @@ QString ICalFormat::toString( Calendar *cal ) } // journals - QPtrList journals = cal->journals(); + Q3PtrList journals = cal->journals(); Journal *j; for(j=journals.first();j;j=journals.next()) { component = mImpl->writeJournal(j); diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h index a770dbb..a454b35 100644 --- a/libkcal/icalformat.h +++ b/libkcal/icalformat.h @@ -21,6 +21,8 @@ #define ICALFORMAT_H #include +//Added by qt3to4: +#include #include "scheduler.h" @@ -106,7 +108,7 @@ class ICalFormat : public CalFormat { bool mProcessEvents; ICalFormatImpl *mImpl; QString mTimeZoneId; - QCString mTzString; + Q3CString mTzString; int tzOffsetMin; bool mUtc; }; diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 65eabc8..ea144ee 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -20,8 +20,11 @@ #include #include -#include +#include #include +//Added by qt3to4: +#include +#include #include #include @@ -221,8 +224,8 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy, } //Loops through all the periods in the freebusy object - QValueList list = freebusy->busyPeriods(); - QValueList::Iterator it; + Q3ValueList list = freebusy->busyPeriods(); + Q3ValueList::Iterator it; icalperiodtype period; for (it = list.begin(); it!= list.end(); ++it) { period.start = writeICalDateTime((*it).start()); @@ -384,12 +387,12 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) } // attachments - QPtrList attachments = incidence->attachments(); + Q3PtrList attachments = incidence->attachments(); for (Attachment *at = attachments.first(); at; at = attachments.next()) icalcomponent_add_property(parent,writeAttachment(at)); // alarms - QPtrList alarms = incidence->alarms(); + Q3PtrList alarms = incidence->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { if (alarm->enabled()) { @@ -423,8 +426,8 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc // attendees if (incidenceBase->attendeeCount() != 0) { - QPtrList al = incidenceBase->attendees(); - QPtrListIterator ai(al); + Q3PtrList al = incidenceBase->attendees(); + Q3PtrListIterator ai(al); for (; ai.current(); ++ai) { icalcomponent_add_property(parent,writeAttendee(ai.current())); } @@ -436,8 +439,8 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties) { - QMap custom = properties->customProperties(); - for (QMap::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap custom = properties->customProperties(); + for (QMap::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); icalproperty_set_x_name(p,c.key()); icalcomponent_add_property(parent,p); @@ -546,8 +549,8 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur) int index = 0; int index2 = 0; - QPtrList tmpPositions; - QPtrList tmpDays; + Q3PtrList tmpPositions; + Q3PtrList tmpDays; int *tmpDay; Recurrence::rMonthPos *tmpPos; bool datetime = false; @@ -704,8 +707,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) break; case Alarm::Email: { action = ICAL_ACTION_EMAIL; - QValueList addresses = alarm->mailAddresses(); - for (QValueList::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { + Q3ValueList addresses = alarm->mailAddresses(); + for (Q3ValueList::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8()); if (!(*ad).name().isEmpty()) { icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8())); @@ -763,8 +766,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) } // Custom properties - QMap custom = alarm->customProperties(); - for (QMap::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap custom = alarm->customProperties(); + for (QMap::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); icalproperty_set_x_name(p,c.key()); icalcomponent_add_property(a,p); @@ -1339,7 +1342,7 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties) { - QMap customProperties; + QMap customProperties; icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY); diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h index 203c302..3a35b4c 100644 --- a/libkcal/icalformatimpl.h +++ b/libkcal/icalformatimpl.h @@ -21,6 +21,8 @@ #define ICALFORMATIMPL_H #include +//Added by qt3to4: +#include #include "scheduler.h" #include "freebusy.h" @@ -93,8 +95,8 @@ class ICalFormatImpl { QString mLoadedProductId; // PRODID string loaded from calendar file int mCalendarVersion; // determines backward compatibility mode on read - QPtrList mEventsRelate; // events with relations - QPtrList mTodosRelate; // todos with relations + Q3PtrList mEventsRelate; // events with relations + Q3PtrList mTodosRelate; // todos with relations static const int mSecondsPerWeek; static const int mSecondsPerDay; diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp index e186f8e..e6d56a6 100644 --- a/libkcal/imipscheduler.cpp +++ b/libkcal/imipscheduler.cpp @@ -26,6 +26,8 @@ #include "icalformat.h" #include "imipscheduler.h" +//Added by qt3to4: +#include using namespace KCal; @@ -50,9 +52,9 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method) return false; } -QPtrList IMIPScheduler::retrieveTransactions() +Q3PtrList IMIPScheduler::retrieveTransactions() { - QPtrList messageList; + Q3PtrList messageList; return messageList; } diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h index f142060..5a2d38e 100644 --- a/libkcal/imipscheduler.h +++ b/libkcal/imipscheduler.h @@ -23,7 +23,7 @@ // iMIP implementation of iTIP methods // -#include +#include #include "scheduler.h" @@ -40,7 +40,7 @@ class IMIPScheduler : public Scheduler { bool publish (IncidenceBase *incidence,const QString &recipients); bool performTransaction(IncidenceBase *incidence,Method method); - QPtrList retrieveTransactions(); + Q3PtrList retrieveTransactions(); }; } diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 7dd9bd2..8fcdc69 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -26,6 +26,8 @@ #include "incidence.h" #include "todo.h" +//Added by qt3to4: +#include using namespace KCal; @@ -59,7 +61,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mRelatedToUid = i.mRelatedToUid; // QPtrList mRelations; QPtrList mRelations; mExDates = i.mExDates; - QPtrListIterator itat( i.mAttachments ); + Q3PtrListIterator itat( i.mAttachments ); Attachment *at; while( (at = itat.current()) ) { Attachment *a = new Attachment( *at ); @@ -73,7 +75,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mLocation = i.mLocation; mCancelled = i.mCancelled; mHasStartDate = i.mHasStartDate; - QPtrListIterator it( i.mAlarms ); + Q3PtrListIterator it( i.mAlarms ); const Alarm *a; while( (a = it.current()) ) { Alarm *b = new Alarm( *a ); @@ -98,7 +100,7 @@ Incidence::~Incidence() { Incidence *ev; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (ev=Relations.first();ev;ev=Relations.next()) { if (ev->relatedTo() == this) ev->setRelatedTo(0); } @@ -216,8 +218,8 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) } } #if 0 - QPtrListIterator a1( i1.alarms() ); - QPtrListIterator a2( i2.alarms() ); + Q3PtrListIterator a1( i1.alarms() ); + Q3PtrListIterator a2( i2.alarms() ); for( ; a1.current() && a2.current(); ++a1, ++a2 ) { if( *a1.current() == *a2.current() ) { continue; @@ -322,7 +324,7 @@ void Incidence::cloneRelations( Incidence * newInc ) // newInc is already a clone of this incidence Incidence * inc; Incidence * cloneInc; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { cloneInc = inc->clone(); cloneInc->recreate(); @@ -356,7 +358,7 @@ QDateTime Incidence::lastModifiedSub() return mLastModifiedSub; mLastModifiedSub = lastModified(); Incidence * inc; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { if ( inc->lastModifiedSub() > mLastModifiedSub ) mLastModifiedSub = inc->lastModifiedSub(); @@ -447,7 +449,7 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations updated(); if ( addToRelations ) { Incidence * inc; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->addCategories( categories, true ); } @@ -462,7 +464,7 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation updated(); if ( setForRelations ) { Incidence * inc; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->setCategories( categories, true ); } @@ -550,15 +552,15 @@ Incidence *Incidence::relatedTo() const return mRelatedTo; } -QPtrList Incidence::relations() const +Q3PtrList Incidence::relations() const { return mRelations; } -void Incidence::addRelationsToList(QPtrList *rel) +void Incidence::addRelationsToList(Q3PtrList *rel) { Incidence* inc; - QPtrList Relations = relations(); + Q3PtrList Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->addRelationsToList( rel ); } @@ -647,15 +649,15 @@ void Incidence::deleteAttachments(const QString& mime) } } -QPtrList Incidence::attachments() const +Q3PtrList Incidence::attachments() const { return mAttachments; } -QPtrList Incidence::attachments(const QString& mime) const +Q3PtrList Incidence::attachments(const QString& mime) const { - QPtrList attachments; - QPtrListIterator it( mAttachments ); + Q3PtrList attachments; + Q3PtrListIterator it( mAttachments ); Attachment *at; while ( (at = it.current()) ) { if (at->mimeType() == mime) @@ -737,7 +739,7 @@ QStringList Incidence::secrecyList() } -QPtrList Incidence::alarms() const +Q3PtrList Incidence::alarms() const { return mAlarms; } @@ -771,7 +773,7 @@ void Incidence::clearAlarms() bool Incidence::isAlarmEnabled() const { Alarm* alarm; - for (QPtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) return true; } diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f89942f..2940129 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -25,7 +25,9 @@ #include #include -#include +#include +//Added by qt3to4: +#include #include "recurrence.h" #include "alarm.h" @@ -113,7 +115,7 @@ class Incidence : public IncidenceBase virtual Incidence *clone() = 0; virtual void cloneRelations( Incidence * ); - void addRelationsToList(QPtrList *rel); + void addRelationsToList(Q3PtrList *rel); void clearRelations(); virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; void setReadOnly( bool ); @@ -177,7 +179,7 @@ class Incidence : public IncidenceBase /** what event does this one relate to? */ Incidence *relatedTo() const; /** All events that are related to this event */ - QPtrList relations() const; + Q3PtrList relations() const; /** Add an event which is related to this event */ void addRelation(Incidence *); /** Remove event that is related to this event */ @@ -202,9 +204,9 @@ class Incidence : public IncidenceBase /** remove and delete all attachments with this mime type */ void deleteAttachments(const QString& mime); /** return list of all associated attachments */ - QPtrList attachments() const; + Q3PtrList attachments() const; /** find a list of attachments with this mime type */ - QPtrList attachments(const QString& mime) const; + Q3PtrList attachments(const QString& mime) const; /** sets the event's status the value specified. See the enumeration * above for possible values. */ @@ -235,7 +237,7 @@ class Incidence : public IncidenceBase int priority() const; /** All alarms that are associated with this incidence */ - QPtrList alarms() const; + Q3PtrList alarms() const; /** Create a new alarm which is associated with this incidence */ Alarm* newAlarm(); /** Add an alarm which is associated with this incidence */ @@ -288,8 +290,8 @@ class Incidence : public IncidenceBase QString durationText4Time( int secs ); Recurrence *mRecurrence; protected: - QPtrList mAlarms; - QPtrList mRelations; + Q3PtrList mAlarms; + Q3PtrList mRelations; QDateTime mRecurrenceID; bool mHasRecurrenceID; private: @@ -308,7 +310,7 @@ protected: Incidence *mRelatedTo; QString mRelatedToUid; DateList mExDates; - QPtrList mAttachments; + Q3PtrList mAttachments; QStringList mResources; bool mHasStartDate; // if todo has associated start date diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 56c0560..f11ec54 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -27,6 +27,8 @@ #include "syncdefines.h" #include "incidencebase.h" +//Added by qt3to4: +#include using namespace KCal; @@ -64,7 +66,7 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : mCalEnabled = i.mCalEnabled; mAlarmEnabled = i.mAlarmEnabled; mCalID = i.mCalID; - QPtrList attendees = i.attendees(); + Q3PtrList attendees = i.attendees(); for( Attendee *a = attendees.first(); a; a = attendees.next() ) { mAttendees.append( new Attendee( *a ) ); } @@ -300,7 +302,7 @@ bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) if (a->name().left(7).upper() == "MAILTO:") a->setName(a->name().remove(0,7)); - QPtrListIterator qli(mAttendees); + Q3PtrListIterator qli(mAttendees); qli.toFirst(); while (qli) { @@ -343,7 +345,7 @@ void IncidenceBase::clearAttendees() #if 0 Attendee *IncidenceBase::getAttendee(const char *n) const { - QPtrListIterator qli(mAttendees); + Q3PtrListIterator qli(mAttendees); qli.toFirst(); while (qli) { @@ -357,7 +359,7 @@ Attendee *IncidenceBase::getAttendee(const char *n) const Attendee *IncidenceBase::attendeeByMail(const QString &email) { - QPtrListIterator qli(mAttendees); + Q3PtrListIterator qli(mAttendees); qli.toFirst(); while (qli) { @@ -370,7 +372,7 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email) Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email) { - QPtrListIterator qli(mAttendees); + Q3PtrListIterator qli(mAttendees); QStringList mails = emails; if (!email.isEmpty()) { @@ -491,7 +493,7 @@ void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer ) void IncidenceBase::updated() { - QPtrListIterator it(mObservers); + Q3PtrListIterator it(mObservers); while( it.current() ) { Observer *o = it.current(); ++it; diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 3edc03b..d97f524 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h @@ -25,15 +25,17 @@ #include #include -#include -#include +#include +#include +//Added by qt3to4: +#include #include "customproperties.h" #include "attendee.h" namespace KCal { -typedef QValueList DateList; +typedef Q3ValueList DateList; enum IncTypeID { eventID,todoID,journalID,freebusyID }; /** @@ -51,7 +53,7 @@ class IncidenceBase : public CustomProperties IncidenceBase(const IncidenceBase &); virtual ~IncidenceBase(); - virtual QCString type() const = 0; + virtual Q3CString type() const = 0; virtual IncTypeID typeID() const = 0; /** Set the unique id for the event */ @@ -109,7 +111,7 @@ class IncidenceBase : public CustomProperties /** Remove all Attendees. */ void clearAttendees(); /** Return list of attendees. */ - QPtrList attendees() const { return mAttendees; }; + Q3PtrList attendees() const { return mAttendees; }; /** Return number of attendees. */ int attendeeCount() const { return mAttendees.count(); }; /** Return the Attendee with this email */ @@ -168,7 +170,7 @@ class IncidenceBase : public CustomProperties bool mCalEnabled; bool mAlarmEnabled; QDateTime mLastModified; - QPtrList mAttendees; + Q3PtrList mAttendees; bool mFloats; @@ -181,7 +183,7 @@ class IncidenceBase : public CustomProperties int mPilotId; // unique id for pilot sync int mSyncStatus; // status (for sync) - QPtrList mObservers; + Q3PtrList mObservers; }; bool operator==( const IncidenceBase&, const IncidenceBase& ); diff --git a/libkcal/journal.h b/libkcal/journal.h index 1cd0a22..c83356f 100644 --- a/libkcal/journal.h +++ b/libkcal/journal.h @@ -24,6 +24,8 @@ // #include "incidence.h" +//Added by qt3to4: +#include namespace KCal { @@ -36,7 +38,7 @@ class Journal : public Incidence Journal(); ~Journal(); - QCString type() const { return "Journal"; } + Q3CString type() const { return "Journal"; } IncTypeID typeID() const { return journalID; } Incidence *clone(); diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 733b897..bce68b0 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -4,6 +4,8 @@ #include #ifdef DEKTOP_VERSION #include +//Added by qt3to4: +#include #define size count #endif @@ -310,7 +312,7 @@ void KIncidenceFormatter::formatCategories(Incidence *event) } void KIncidenceFormatter::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; QString tmpText=text; QString tmpStr=str; @@ -339,7 +341,7 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text) void KIncidenceFormatter::formatAttendees(Incidence *event) { - QPtrList attendees = event->attendees(); + Q3PtrList attendees = event->attendees(); if (attendees.count()) { QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); @@ -362,7 +364,7 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) #else mText.append(event->organizer()); #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " organizer() + "\">"; mText += ""; mText += "\n"; @@ -402,7 +404,7 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) #endif if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "name() +" "+ "<" + a->email() + ">" + "\">"; if ( a->RSVP() ) mText += ""; diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro index 33c63c3..1f43b10 100644 --- a/libkcal/libkcal.pro +++ b/libkcal/libkcal.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal include( ../variables.pri ) @@ -106,3 +106,7 @@ dndfactory.cpp \ versit/vobject.c \ phoneformat.cpp \ +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +QT += diff --git a/libkcal/libkcalE.pro b/libkcal/libkcalE.pro index 737be53..fe46656 100644 --- a/libkcal/libkcalE.pro +++ b/libkcal/libkcalE.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal INCLUDEPATH += ../libkdepim ../microkde ../qtcompat versit ../microkde/kdecore $(QPEDIR)/include INCLUDEPATH += ../libical/src/libical diff --git a/libkcal/listbase.h b/libkcal/listbase.h index 085b13d..6c942ef 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h @@ -21,7 +21,9 @@ #ifndef KCAL_LISTBASE_H #define KCAL_LISTBASE_H -#include +#include +//Added by qt3to4: +#include namespace KCal { class Event; @@ -31,24 +33,24 @@ namespace KCal { *> by auto delete funtionality known from QPtrList. */ template -class ListBase : public QValueList +class ListBase : public Q3ValueList { public: ListBase() - : QValueList(), mAutoDelete( false ) + : Q3ValueList(), mAutoDelete( false ) { } ListBase( const ListBase &l ) - : QValueList( l ), mAutoDelete( false ) + : Q3ValueList( l ), mAutoDelete( false ) { } ~ListBase() { if ( mAutoDelete ) { - QValueListIterator it; - for( it = QValueList::begin(); it != QValueList::end(); ++it ) { + Q3ValueListIterator it; + for( it = Q3ValueList::begin(); it != Q3ValueList::end(); ++it ) { delete *it; } } @@ -57,7 +59,7 @@ class ListBase : public QValueList ListBase &operator=( const ListBase &l ) { if ( this == &l ) return *this; - QValueList::operator=( l ); + Q3ValueList::operator=( l ); return *this; } @@ -68,8 +70,8 @@ class ListBase : public QValueList bool removeRef( T *t ) { - QValueListIterator it = find( t ); - if ( it == QValueList::end() ) { + Q3ValueListIterator it = find( t ); + if ( it == Q3ValueList::end() ) { return false; } else { if ( mAutoDelete ) delete t; @@ -77,8 +79,8 @@ class ListBase : public QValueList return true; } } - void fill ( QPtrList list ) { - QPtrListIterator it (list); + void fill ( Q3PtrList list ) { + Q3PtrListIterator it (list); T *item; while ( (item = it.current()) != 0 ) { append( item ); diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 900fc04..794e4b4 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -22,15 +22,16 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include +#include #include #include @@ -201,7 +202,7 @@ ulong PhoneFormat::getCsumEvent( Event* event ) writeEndDate = true; { int count = 1; - QPtrList rmp; + Q3PtrList rmp; rmp = rec->monthPositions(); if ( rmp.first()->negative ) count = 5 - rmp.first()->rPos - 1; @@ -241,7 +242,7 @@ ulong PhoneFormat::getCsumEvent( Event* event ) if ( rec->endDate().isValid() ) { // 15 + 16 list.append( "1" ); - list.append( PhoneParser::dtToString( rec->endDate()) ); + list.append( PhoneParser::dtToString( (QDateTime)rec->endDate()) ); } else { list.append( "0" ); list.append( "20991231T000000" ); @@ -305,7 +306,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) if ( ! vfload.load( calendar, fileName ) ) return false; - QPtrList er = calendar->rawEvents(); + Q3PtrList er = calendar->rawEvents(); Event* ev = er.first(); qDebug("reading events... "); while ( ev ) { @@ -340,7 +341,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) } { qDebug("reading todos... "); - QPtrList tr = calendar->rawTodos(); + Q3PtrList tr = calendar->rawTodos(); Todo* ev = tr.first(); while ( ev ) { @@ -465,7 +466,7 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from ) to->setPriority(from->priority()); } -#include +#include void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum) { @@ -497,7 +498,7 @@ bool PhoneFormat::save( Calendar *calendar) // 1 remove events which should be deleted - QPtrList er = calendar->rawEvents(); + Q3PtrList er = calendar->rawEvents(); Event* ev = er.first(); while ( ev ) { if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { @@ -508,7 +509,7 @@ bool PhoneFormat::save( Calendar *calendar) ev = er.next(); } // 2 remove todos which should be deleted - QPtrList tl = calendar->rawTodos(); + Q3PtrList tl = calendar->rawTodos(); Todo* to = tl.first(); while ( to ) { if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { @@ -552,7 +553,7 @@ bool PhoneFormat::save( Calendar *calendar) er = calendar->rawEvents(); ev = er.first(); message = i18n(" Comparing event # "); - QPtrList er1 = calendarTemp->rawEvents(); + Q3PtrList er1 = calendarTemp->rawEvents(); Event* ev1; int procCount = 0; while ( ev ) { @@ -580,7 +581,7 @@ bool PhoneFormat::save( Calendar *calendar) tl = calendar->rawTodos(); to = tl.first(); procCount = 0; - QPtrList tl1 = calendarTemp->rawTodos(); + Q3PtrList tl1 = calendarTemp->rawTodos(); Todo* to1 ; message = i18n(" Comparing todo # "); while ( to ) { diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 0a4a031..2dfe1a4 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -21,11 +21,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include @@ -309,12 +309,12 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) // TODO: write backup file QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, i18n("Could not open file '%1'").arg(fileName))); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; file.close(); diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 6ee5499..9a4e540 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -29,6 +29,9 @@ #include "incidence.h" #include "recurrence.h" +//Added by qt3to4: +#include +#include using namespace KCal; @@ -56,7 +59,7 @@ Recurrence::Recurrence(Incidence *parent, int compatVersion) Recurrence::Recurrence(const Recurrence &r, Incidence *parent) : recurs(r.recurs), rWeekStart(r.rWeekStart), - rDays(r.rDays.copy()), + rDays(r.rDays), rFreq(r.rFreq), rDuration(r.rDuration), rEndDateTime(r.rEndDateTime), @@ -70,19 +73,19 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) mCompatDuration(r.mCompatDuration), mParent(parent) { - for (QPtrListIterator mp(r.rMonthPositions); mp.current(); ++mp) { + for (Q3PtrListIterator mp(r.rMonthPositions); mp.current(); ++mp) { rMonthPos *tmp = new rMonthPos; tmp->rPos = mp.current()->rPos; tmp->negative = mp.current()->negative; - tmp->rDays = mp.current()->rDays.copy(); + tmp->rDays = mp.current()->rDays; rMonthPositions.append(tmp); } - for (QPtrListIterator md(r.rMonthDays); md.current(); ++md) { + for (Q3PtrListIterator md(r.rMonthDays); md.current(); ++md) { int *tmp = new int; *tmp = *md.current(); rMonthDays.append(tmp); } - for (QPtrListIterator yn(r.rYearNums); yn.current(); ++yn) { + for (Q3PtrListIterator yn(r.rYearNums); yn.current(); ++yn) { int *tmp = new int; *tmp = *yn.current(); rYearNums.append(tmp); @@ -124,8 +127,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const return rDays == r2.rDays && rWeekStart == r2.rWeekStart; case rMonthlyPos: { - QPtrList MonthPositions = rMonthPositions; - QPtrList MonthPositions2 = r2.rMonthPositions; + Q3PtrList MonthPositions = rMonthPositions; + Q3PtrList MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) return false; if ( !MonthPositions2.count() ) @@ -133,8 +136,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const return MonthPositions.first()->rPos == MonthPositions2.first()->rPos; } case rMonthlyDay: { - QPtrList MonthDays = rMonthDays ; - QPtrList MonthDays2 = r2.rMonthDays ; + Q3PtrList MonthDays = rMonthDays ; + Q3PtrList MonthDays2 = r2.rMonthDays ; if ( !MonthDays.count() ) return false; if ( !MonthDays2.count() ) @@ -143,12 +146,12 @@ bool Recurrence::operator==( const Recurrence& r2 ) const } case rYearlyPos: { - QPtrList YearNums = rYearNums; - QPtrList YearNums2 = r2.rYearNums; + Q3PtrList YearNums = rYearNums; + Q3PtrList YearNums2 = r2.rYearNums; if ( *YearNums.first() != *YearNums2.first() ) return false; - QPtrList MonthPositions = rMonthPositions; - QPtrList MonthPositions2 = r2.rMonthPositions; + Q3PtrList MonthPositions = rMonthPositions; + Q3PtrList MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) return false; if ( !MonthPositions2.count() ) @@ -157,13 +160,13 @@ bool Recurrence::operator==( const Recurrence& r2 ) const } case rYearlyMonth: { - QPtrList YearNums = rYearNums; - QPtrList YearNums2 = r2.rYearNums; + Q3PtrList YearNums = rYearNums; + Q3PtrList YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType); } case rYearlyDay: { - QPtrList YearNums = rYearNums; - QPtrList YearNums2 = r2.rYearNums; + Q3PtrList YearNums = rYearNums; + Q3PtrList YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() ); } case rNone: @@ -357,7 +360,7 @@ QDateTime Recurrence::endDateTime() const case rHourly: return mRecurStart.addSecs((rDuration-1+mRecurExDatesCount)*rFreq*3600); case rDaily: - return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); + return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); case rWeekly: count = weeklyCalc(END_DATE_AND_COUNT, end); @@ -506,17 +509,17 @@ const QBitArray &Recurrence::days() const return rDays; } -const QPtrList &Recurrence::monthPositions() const +const Q3PtrList &Recurrence::monthPositions() const { return rMonthPositions; } -const QPtrList &Recurrence::yearMonthPositions() const +const Q3PtrList &Recurrence::yearMonthPositions() const { return rMonthPositions; } -const QPtrList &Recurrence::monthDays() const +const Q3PtrList &Recurrence::monthDays() const { return rMonthDays; } @@ -759,7 +762,7 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays) addMonthlyPos_(_rPos, _rDays); } -const QPtrList &Recurrence::yearNums() const +const Q3PtrList &Recurrence::yearNums() const { return rYearNums; } @@ -1047,13 +1050,13 @@ bool Recurrence::recursMonthly(const QDate &qd) const (rDuration == 0 && qd <= rEndDateTime.date()) || rDuration == -1)) { // The date queried falls within the range of the event. - QValueList days; + Q3ValueList days; int daysInMonth = qd.daysInMonth(); if (recurs == rMonthlyDay) getMonthlyDayDays(days, daysInMonth); else if (recurs == rMonthlyPos) getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek()); - for (QValueList::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) return true; } @@ -1101,7 +1104,7 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const rDuration == -1)) { // The date queried falls within the range of the event. int i = qmonth; - for (QPtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) return true; } @@ -1127,12 +1130,12 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const (rDuration == 0 && qd <= rEndDateTime.date()) || rDuration == -1)) { // The date queried falls within the range of the event. - for (QPtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { if (month == *qlin.current()) { // The month recurs - QValueList days; + Q3ValueList days; getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek()); - for (QValueList::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) return true; } @@ -1157,7 +1160,7 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const rDuration == -1)) { // The date queried falls within the range of the event. int i = qd.dayOfYear(); - for (QPtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) return true; } @@ -1549,7 +1552,7 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const case END_DATE_AND_COUNT: case NEXT_AFTER_DATE: if (count == 0) - endtime = QDate(); + endtime = QDateTime(); else if (timed) enddate = endtime.date(); break; @@ -1793,8 +1796,8 @@ struct Recurrence::MonthlyData { int day; // current day of month 1..31 bool varies; // true if recurring days vary between different months private: - QValueList days28, days29, days30, days31; // recurring days in months of each length - QValueList *recurDays[4]; + Q3ValueList days28, days29, days30, days31; // recurring days in months of each length + Q3ValueList *recurDays[4]; public: MonthlyData(const Recurrence* r, const QDate &date) : recurrence(r), year(date.year()), month(date.month()-1), day(date.day()) @@ -1805,12 +1808,12 @@ struct Recurrence::MonthlyData { varies = (recurrence->recurs == rMonthlyPos) ? true : recurrence->getMonthlyDayDays(days31, 31); } - const QValueList* dayList() const { + const Q3ValueList* dayList() const { if (!varies) return &days31; QDate startOfMonth(year, month + 1, 1); int daysInMonth = startOfMonth.daysInMonth(); - QValueList* days = recurDays[daysInMonth - 28]; + Q3ValueList* days = recurDays[daysInMonth - 28]; if (recurrence->recurs == rMonthlyPos) recurrence->getMonthlyPosDays(*days, daysInMonth, startOfMonth.dayOfWeek()); else if (days->isEmpty()) @@ -1844,8 +1847,8 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const { uint countTogo = rDuration + mRecurExDatesCount; int countGone = 0; - QValueList::ConstIterator it; - const QValueList* days = data.dayList(); + Q3ValueList::ConstIterator it; + const Q3ValueList* days = data.dayList(); if (data.day > 1) { // Check what remains of the start month @@ -1910,8 +1913,8 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const int endMonth = enddate.month() - 1; // zero-based int endDay = enddate.day(); int endYearMonth = endYear*12 + endMonth; - QValueList::ConstIterator it; - const QValueList* days = data.dayList(); + Q3ValueList::ConstIterator it; + const Q3ValueList* days = data.dayList(); if (data.day > 1) { // Check what remains of the start month @@ -1969,8 +1972,8 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const int endYear = enddate.year(); int endDay = enddate.day(); int endYearMonth = endYear*12 + enddate.month() - 1; - QValueList::ConstIterator it; - const QValueList* days = data.dayList(); + Q3ValueList::ConstIterator it; + const Q3ValueList* days = data.dayList(); if (data.day > 1) { // Check what remains of the start month @@ -2052,17 +2055,17 @@ struct Recurrence::YearlyMonthData { bool leapyear; // true if February 29th recurs and current year is a leap year bool feb29; // true if February 29th recurs private: - QValueList months; // recurring months in non-leap years 1..12 - QValueList leapMonths; // recurring months in leap years 1..12 + Q3ValueList months; // recurring months in non-leap years 1..12 + Q3ValueList leapMonths; // recurring months in leap years 1..12 public: YearlyMonthData(const Recurrence* r, const QDate &date) : recurrence(r), year(date.year()), month(date.month()), day(date.day()) { feb29 = recurrence->getYearlyMonthMonths(day, months, leapMonths); leapyear = feb29 && QDate::leapYear(year); } - const QValueList* monthList() const + const Q3ValueList* monthList() const { return leapyear ? &leapMonths : &months; } - const QValueList* leapMonthList() const { return &leapMonths; } + const Q3ValueList* leapMonthList() const { return &leapMonths; } QDate date() const { return QDate(year, month, day); } }; @@ -2088,8 +2091,8 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co { uint countTogo = rDuration + mRecurExDatesCount; int countGone = 0; - QValueList::ConstIterator it; - const QValueList* mons = data.monthList(); // get recurring months for this year + Q3ValueList::ConstIterator it; + const Q3ValueList* mons = data.monthList(); // get recurring months for this year if (data.month > 1) { // Check what remains of the start year @@ -2199,8 +2202,8 @@ int Recurrence::yearlyMonthCalcToDate(const QDate &enddate, YearlyMonthData &dat --endYear; } } - QValueList::ConstIterator it; - const QValueList* mons = data.monthList(); + Q3ValueList::ConstIterator it; + const Q3ValueList* mons = data.monthList(); if (data.month > 1) { // Check what remains of the start year @@ -2270,8 +2273,8 @@ int Recurrence::yearlyMonthCalcNextAfter(QDate &enddate, YearlyMonthData &data) --endYear; } } - QValueList::ConstIterator it; - const QValueList* mons = data.monthList(); + Q3ValueList::ConstIterator it; + const Q3ValueList* mons = data.monthList(); if (data.month > 1) { // Check what remains of the start year @@ -2390,7 +2393,7 @@ struct Recurrence::YearlyPosData { int count; // number of days which recur each year, or -1 if variable bool varies; // true if number of days varies from year to year private: - mutable QValueList days; + mutable Q3ValueList days; public: YearlyPosData(const Recurrence* r, const QDate &date) : recurrence(r), year(date.year()), month(date.month()), day(date.day()), count(-1) @@ -2398,7 +2401,7 @@ struct Recurrence::YearlyPosData { count = daysPerMonth * r->rYearNums.count(); varies = (daysPerMonth < 0); } - const QValueList* dayList() const { + const Q3ValueList* dayList() const { QDate startOfMonth(year, month, 1); recurrence->getMonthlyPosDays(days, startOfMonth.daysInMonth(), startOfMonth.dayOfWeek()); return &days; @@ -2428,12 +2431,12 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const { uint countTogo = rDuration + mRecurExDatesCount; int countGone = 0; - QValueList::ConstIterator id; - const QValueList* days; + Q3ValueList::ConstIterator id; + const Q3ValueList* days; if (data.month > 1 || data.day > 1) { // Check what remains of the start year - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { // Check what remains of the start month if (data.day > 1 || data.varies @@ -2466,7 +2469,7 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const if (data.varies) { // The number of recurrences varies from year to year. for ( ; ; ) { - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { data.month = *im.current(); days = data.dayList(); int n = days->count(); @@ -2496,7 +2499,7 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const countTogo -= wholeYears * data.count; // Check the last year in the recurrence. - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { if (static_cast(data.daysPerMonth) >= countTogo) { // Check the last month in the recurrence data.month = *im.current(); @@ -2531,12 +2534,12 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c --endYear; } int endYearMonth = endYear*12 + endMonth; - QValueList::ConstIterator id; - const QValueList* days; + Q3ValueList::ConstIterator id; + const Q3ValueList* days; if (data.month > 1 || data.day > 1) { // Check what remains of the start year - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { data.month = *im.current(); if (data.yearMonth() > endYearMonth) @@ -2576,7 +2579,7 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c if (data.varies) { // The number of recurrences varies from year to year. for ( ; ; ) { - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { data.month = *im.current(); days = data.dayList(); if (data.yearMonth() >= endYearMonth) { @@ -2611,7 +2614,7 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c data.year = endYear; // Check the last year in the recurrence. - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { data.month = *im.current(); if (data.month >= endMonth) { if (data.month > endMonth) @@ -2646,14 +2649,14 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons --endYear; } int endYearMonth = endYear*12 + endMonth; - QValueList::ConstIterator id; - const QValueList* days; + Q3ValueList::ConstIterator id; + const Q3ValueList* days; if (data.varies) { // The number of recurrences varies from year to year. for ( ; ; ) { // Check the next year - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { // Check the next month data.month = *im.current(); @@ -2689,7 +2692,7 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // The number of recurrences is the same every year. if (data.month > 1 || data.day > 1) { // Check what remains of the start year - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { // Check what remains of the start month data.month = *im.current(); @@ -2734,7 +2737,7 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons } // Check the last year in the recurrence - for (QPtrListIterator im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator im(rYearNums); im.current(); ++im) { data.month = *im.current(); int ended = data.yearMonth() - endYearMonth; if (ended >= 0) { @@ -2808,7 +2811,7 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const if (data.day > 1) { // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { ++countGone; @@ -2846,7 +2849,7 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const } if (countTogo) { // Check the last year in the recurrence - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { ++countGone; if (--countTogo == 0) { data.day = *it.current(); @@ -2869,7 +2872,7 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c if (data.day > 1) { // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { if (data.year == endYear && d > endDay) @@ -2908,7 +2911,7 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c if (data.year <= endYear) { // Check the last year in the recurrence - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { if (*it.current() > endDay) return countGone; if (++countGone >= countMax) @@ -2928,7 +2931,7 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons if (data.day > 1) { // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { ++countGone; @@ -2977,7 +2980,7 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons } // Check the last year in the recurrence - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { ++countGone; int d = *it.current(); if (data.year > endYear || d > endDay) { @@ -2995,13 +2998,13 @@ ex: // Get the days in this month which recur, in numerical order. // Parameters: daysInMonth = number of days in this month // startDayOfWeek = day of week for first day of month. -void Recurrence::getMonthlyPosDays(QValueList &list, int daysInMonth, int startDayOfWeek) const +void Recurrence::getMonthlyPosDays(Q3ValueList &list, int daysInMonth, int startDayOfWeek) const { list.clear(); int endDayOfWeek = (startDayOfWeek + daysInMonth - 2) % 7 + 1; // Go through the list, compiling a bit list of actual day numbers Q_UINT32 days = 0; - for (QPtrListIterator pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos - 1; // get 0-based week number QBitArray &rdays = pos.current()->rDays; if (pos.current()->negative) { @@ -3039,7 +3042,7 @@ int Recurrence::countMonthlyPosDays() const int count = 0; Q_UINT8 positive[5] = { 0, 0, 0, 0, 0 }; Q_UINT8 negative[4] = { 0, 0, 0, 0 }; - for (QPtrListIterator pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos; Q_UINT8* wk; if (pos.current()->negative) { @@ -3072,12 +3075,12 @@ int Recurrence::countMonthlyPosDays() const // Get the days in this month which recur, in numerical order. // Reply = true if day numbers varies from month to month. -bool Recurrence::getMonthlyDayDays(QValueList &list, int daysInMonth) const +bool Recurrence::getMonthlyDayDays(Q3ValueList &list, int daysInMonth) const { list.clear(); bool variable = false; Q_UINT32 days = 0; - for (QPtrListIterator it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day > 0) { // date in the month @@ -3106,12 +3109,12 @@ bool Recurrence::getMonthlyDayDays(QValueList &list, int daysInMonth) const // N.B. If February 29th recurs on March 1st in non-leap years, February (not March) is // included in the non-leap year month list. // Reply = true if February 29th also recurs. -bool Recurrence::getYearlyMonthMonths(int day, QValueList &list, QValueList &leaplist) const +bool Recurrence::getYearlyMonthMonths(int day, Q3ValueList &list, Q3ValueList &leaplist) const { list.clear(); leaplist.clear(); bool feb29 = false; - for (QPtrListIterator it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator it(rYearNums); it.current(); ++it) { int month = *it.current(); if (month == 2) { if (day <= 28) { @@ -3187,7 +3190,7 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const switch (recurs) { case rMonthlyDay: { int minday = daysInMonth + 1; - for (QPtrListIterator it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day < 0) day = daysInMonth + day + 1; @@ -3201,9 +3204,9 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const case rMonthlyPos: case rYearlyPos: { QDate monthBegin(earliestDate.addDays(1 - earliestDay)); - QValueList dayList; + Q3ValueList dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) return monthBegin.addDays(*id - 1); } @@ -3224,7 +3227,7 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const switch (recurs) { case rMonthlyDay: { int maxday = -1; - for (QPtrListIterator it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day < 0) day = daysInMonth + day + 1; @@ -3238,9 +3241,9 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const case rMonthlyPos: case rYearlyPos: { QDate monthBegin(latestDate.addDays(1 - latestDay)); - QValueList dayList; + Q3ValueList dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) return monthBegin.addDays(*id - 1); } @@ -3256,7 +3259,7 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const */ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const { - QPtrListIterator it(rYearNums); + Q3PtrListIterator it(rYearNums); switch (recurs) { case rYearlyMonth: { int day = recurStart().date().day(); @@ -3292,7 +3295,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const break; } case rYearlyPos: { - QValueList dayList; + Q3ValueList dayList; int earliestYear = earliestDate.year(); int earliestMonth = earliestDate.month(); int earliestDay = earliestDate.day(); @@ -3301,7 +3304,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const if (month >= earliestMonth) { QDate monthBegin(earliestYear, month, 1); getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) return monthBegin.addDays(*id - 1); } @@ -3329,7 +3332,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const */ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const { - QPtrListIterator it(rYearNums); + Q3PtrListIterator it(rYearNums); switch (recurs) { case rYearlyMonth: { int day = recurStart().date().day(); @@ -3364,7 +3367,7 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const break; } case rYearlyPos: { - QValueList dayList; + Q3ValueList dayList; int latestYear = latestDate.year(); int latestMonth = latestDate.month(); int latestDay = latestDate.day(); @@ -3373,7 +3376,7 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const if (month <= latestMonth) { QDate monthBegin(latestYear, month, 1); getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) return monthBegin.addDays(*id - 1); } diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index b13d14f..5b5aab1 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -24,7 +24,9 @@ #include #include -#include +#include +//Added by qt3to4: +#include namespace KCal { @@ -248,9 +250,9 @@ class Recurrence */ void addMonthlyDay(short _rDay); /** Returns list of day positions in months. */ - const QPtrList &monthPositions() const; + const Q3PtrList &monthPositions() const; /** Returns list of day numbers of a month. */ - const QPtrList &monthDays() const; + const Q3PtrList &monthDays() const; /** Sets an event to recur yearly. * @var type rYearlyMonth, rYearlyPos or rYearlyDay @@ -279,9 +281,9 @@ class Recurrence */ void addYearlyMonthPos(short _rPos, const QBitArray &_rDays); /** Returns positions of days or months in year. */ - const QPtrList &yearNums() const; + const Q3PtrList &yearNums() const; /** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */ - const QPtrList &yearMonthPositions() const; + const Q3PtrList &yearMonthPositions() const; /** Returns how yearly recurrences of February 29th are handled. */ Feb29Type feb29YearlyType() const { return mFeb29YearlyType; } /** Sets the default method for handling yearly recurrences of February 29th. */ @@ -294,8 +296,8 @@ class Recurrence */ void dump() const; QString recurrenceText() const; - bool getYearlyMonthMonths(int day, QValueList&, - QValueList &leaplist) const; + bool getYearlyMonthMonths(int day, Q3ValueList&, + Q3ValueList &leaplist) const; protected: enum PeriodFunc { END_DATE_AND_COUNT, COUNT_TO_DATE, NEXT_AFTER_DATE }; @@ -345,9 +347,9 @@ class Recurrence int yearlyDayCalcNextAfter(QDate& enddate, YearlyDayData&) const; int countMonthlyPosDays() const; - void getMonthlyPosDays(QValueList&, int daysInMonth, + void getMonthlyPosDays(Q3ValueList&, int daysInMonth, int startDayOfWeek) const; - bool getMonthlyDayDays(QValueList&, int daysInMonth) const; + bool getMonthlyDayDays(Q3ValueList&, int daysInMonth) const; int getFirstDayInWeek(int startDay, bool useWeekStart = true) const; int getLastDayInWeek(int endDay, bool useWeekStart = true) const; @@ -366,13 +368,13 @@ class Recurrence int rWeekStart; // day which starts the week, Monday=1 .. Sunday=7 QBitArray rDays; // array of days during week it recurs - QPtrList rMonthPositions; // list of positions during a month + Q3PtrList rMonthPositions; // list of positions during a month // on which an event recurs - QPtrList rMonthDays; // list of days during a month on + Q3PtrList rMonthDays; // list of days during a month on // which the event recurs - QPtrList rYearNums; // either months/days to recur on for rYearly, + Q3PtrList rYearNums; // either months/days to recur on for rYearly, // sorted in numerical order int rFreq; // frequency of period diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp index 253d8b7..234cfcf 100644 --- a/libkcal/scheduler.cpp +++ b/libkcal/scheduler.cpp @@ -20,7 +20,9 @@ #include #include -#include +#include +//Added by qt3to4: +#include #include #include @@ -264,8 +266,8 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status sta if (ev || to) { //get matching attendee in calendar kdDebug(5800) << "Scheduler::acceptTransaction match found!" << endl; - QPtrList attendeesIn = incidence->attendees(); - QPtrList attendeesEv; + Q3PtrList attendeesIn = incidence->attendees(); + Q3PtrList attendeesEv; if (ev) attendeesEv = ev->attendees(); if (to) attendeesEv = to->attendees(); Attendee *attIn; @@ -342,11 +344,11 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) QString messageText = mFormat->createScheduleMessage(freebusy, Publish); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl; return false; } - QTextStream t(&f); + Q3TextStream t(&f); t << messageText; f.close(); diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h index a9f43b9..357e98e 100644 --- a/libkcal/scheduler.h +++ b/libkcal/scheduler.h @@ -23,7 +23,7 @@ // iTIP transactions base class #include -#include +#include namespace KCal { @@ -95,7 +95,7 @@ class Scheduler { method. */ virtual bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients) = 0; /** Retrieve incoming iTIP transactions */ - virtual QPtrList retrieveTransactions() = 0; + virtual Q3PtrList retrieveTransactions() = 0; /** Accept transaction. The incidence argument specifies the iCal compoennt diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index 9b757f7..b8c2aa7 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -22,12 +22,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -366,11 +366,11 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) } QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); text = ts.read(); file.close(); @@ -388,7 +388,7 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) fileName = "/tmp/todo.txt"; } file.setName( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } @@ -475,7 +475,7 @@ bool SharpFormat::save( Calendar *calendar) QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n"; QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n"; QString command; - QPtrList er = calendar->rawEvents(); + Q3PtrList er = calendar->rawEvents(); Event* ev = er.first(); QString fileName = "/tmp/kopitempout"; int i = 0; @@ -503,10 +503,10 @@ bool SharpFormat::save( Calendar *calendar) else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new QString fileNameIn = "/tmp/kopitempin"; QFile fileIn( fileNameIn ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << ePrefix << eString ; fileIn.close(); @@ -517,11 +517,11 @@ bool SharpFormat::save( Calendar *calendar) //qDebug("command -------- "); system ( command.utf8() ); QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); answer = ts.read(); file.close(); @@ -544,11 +544,11 @@ bool SharpFormat::save( Calendar *calendar) //qDebug("changing... "); if ( changeEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << changeString ; file.close(); @@ -562,11 +562,11 @@ bool SharpFormat::save( Calendar *calendar) //qDebug("deleting... "); if ( deleteEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << deleteString; file.close(); @@ -580,7 +580,7 @@ bool SharpFormat::save( Calendar *calendar) deleteString = tPrefix; status.setText ( i18n("Processing todos ...") ); qApp->processEvents(); - QPtrList tl = calendar->rawTodos(); + Q3PtrList tl = calendar->rawTodos(); Todo* to = tl.first(); i = 0; message = i18n("Processing todo # "); @@ -605,20 +605,20 @@ bool SharpFormat::save( Calendar *calendar) QString fileNameIn = "/tmp/kopitempin"; QFile fileIn( fileNameIn ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << tPrefix << eString ; fileIn.close(); command = "(cat /tmp/kopitempin | db2file todo -w -g -c " + codec+ ") > "+ fileName; system ( command.utf8() ); QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); answer = ts.read(); file.close(); @@ -642,11 +642,11 @@ bool SharpFormat::save( Calendar *calendar) //qDebug("changing... "); if ( changeEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << changeString ; file.close(); @@ -660,11 +660,11 @@ bool SharpFormat::save( Calendar *calendar) //qDebug("deleting... "); if ( deleteEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << deleteString; file.close(); @@ -783,7 +783,7 @@ QString SharpFormat::getEventString( Event* event ) writeEndDate = true; { int count = 1; - QPtrList rmp; + Q3PtrList rmp; rmp = rec->monthPositions(); if ( rmp.first()->negative ) count = 5 - rmp.first()->rPos - 1; diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -623,7 +623,7 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d // *ok = false; // return incidenceStart; // } - for (QPtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { if ( alarm->time() < alarmStart ) { diff --git a/libkcal/todo.h b/libkcal/todo.h index 2131732..cea976c 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -26,6 +26,8 @@ #include "incidence.h" #include +//Added by qt3to4: +#include namespace KCal { @@ -40,7 +42,7 @@ namespace KCal { Todo(const Todo &); ~Todo(); typedef ListBase List; - QCString type() const { return "Todo"; } + Q3CString type() const { return "Todo"; } IncTypeID typeID() const { return todoID; } /** Return an exact copy of this todo. */ diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp index f01f332..324981e 100644 --- a/libkcal/vcaldrag.cpp +++ b/libkcal/vcaldrag.cpp @@ -26,7 +26,7 @@ using namespace KCal; VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/x-vCalendar", parent, name ) + : Q3StoredDrag( "text/x-vCalendar", parent, name ) { VCalFormat format; setEncodedData( format.toString( cal ).utf8() ); diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h index 3048124..68a320d 100644 --- a/libkcal/vcaldrag.h +++ b/libkcal/vcaldrag.h @@ -22,7 +22,7 @@ #ifndef VCALDRAG_H #define VCALDRAG_H -#include +#include namespace KCal { @@ -30,7 +30,7 @@ namespace KCal { class Calendar; /** vCalendar drag&drop class. */ -class VCalDrag : public QStoredDrag { +class VCalDrag : public Q3StoredDrag { public: /** Create a drag&drop object for vCalendar component \a vcal. */ VCalDrag( Calendar *vcal, QWidget *parent = 0, const char *name = 0 ); diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 2e19740..9cbaf16 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -22,11 +22,13 @@ #include #include #include -#include +#include #include #include #include #include +//Added by qt3to4: +#include #include #include @@ -108,15 +110,15 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) addPropValue(vcal,VCVersionProp, _VCAL_VERSION); // TODO STUFF - QPtrList todoList = mCalendar->rawTodos(); - QPtrListIterator qlt(todoList); + Q3PtrList todoList = mCalendar->rawTodos(); + Q3PtrListIterator qlt(todoList); for (; qlt.current(); ++qlt) { vo = eventToVTodo(qlt.current()); addVObjectProp(vcal, vo); } // EVENT STUFF - QPtrList events = mCalendar->rawEvents(); + Q3PtrList events = mCalendar->rawEvents(); Event *ev; for(ev=events.first();ev;ev=events.next()) { vo = eventToVEvent(ev); @@ -138,7 +140,7 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) { // TODO: Factor out VCalFormat::fromString() - QCString data = text.utf8(); + Q3CString data = text.utf8(); if ( !data.size() ) return false; @@ -210,7 +212,7 @@ QString VCalFormat::toString( Calendar *calendar ) addPropValue( vcal, VCVersionProp, _VCAL_VERSION ); // TODO: Use all data. - QPtrList events = calendar->events(); + Q3PtrList events = calendar->events(); Event *event = events.first(); if ( !event ) return QString::null; @@ -271,8 +273,8 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // attendees if (anEvent->attendeeCount() != 0) { - QPtrList al = anEvent->attendees(); - QPtrListIterator ai(al); + Q3PtrList al = anEvent->attendees(); + Q3PtrListIterator ai(al); Attendee *curAttendee; for (; ai.current(); ++ai) { @@ -326,7 +328,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) addPropValue(vtodo, VCPriorityProp, tmpStr.local8Bit()); // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vtodo, VCRelatedToProp, anEvent->relatedToUid().local8Bit()); } @@ -355,7 +357,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // alarm stuff kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl; - QPtrList alarms = anEvent->alarms(); + Q3PtrList alarms = anEvent->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { if (alarm->enabled()) { @@ -433,8 +435,8 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) addPropValue(vevent, ICOrganizerProp, tmpStr.local8Bit()); if (anEvent->attendeeCount() != 0) { - QPtrList al = anEvent->attendees(); - QPtrListIterator ai(al); + Q3PtrList al = anEvent->attendees(); + Q3PtrListIterator ai(al); Attendee *curAttendee; // TODO: Put this functionality into Attendee class @@ -461,8 +463,8 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // recurrence rule stuff if (anEvent->doesRecur()) { // some more variables - QPtrList tmpPositions; - QPtrList tmpDays; + Q3PtrList tmpPositions; + Q3PtrList tmpDays; int *tmpDay; Recurrence::rMonthPos *tmpPos; QString tmpStr2; @@ -545,7 +547,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) } else if (anEvent->recurrence()->duration() == -1) { tmpStr += "#0"; // defined as repeat forever } else { - tmpStr += qDateTimeToISO(anEvent->recurrence()->endDate(), FALSE); + tmpStr += qDateTimeToISO((QDateTime)anEvent->recurrence()->endDate(), FALSE); } addPropValue(vevent,VCRRuleProp, tmpStr.local8Bit()); @@ -625,7 +627,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // attachments // TODO: handle binary attachments! - QPtrList attachments = anEvent->attachments(); + Q3PtrList attachments = anEvent->attachments(); for ( Attachment *at = attachments.first(); at; at = attachments.next() ) addPropValue(vevent, VCAttachProp, at->uri().local8Bit()); @@ -636,7 +638,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) addPropValue(vevent, VCResourcesProp, tmpStr.local8Bit()); // alarm stuff - QPtrList alarms = anEvent->alarms(); + Q3PtrList alarms = anEvent->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { if (alarm->enabled()) { @@ -672,7 +674,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) addPropValue(vevent, VCTranspProp, tmpStr.local8Bit()); // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vevent, VCRelatedToProp, anEvent->relatedToUid().local8Bit()); } @@ -1408,7 +1410,7 @@ QString VCalFormat::qDateToISO(const QDate &qd) { QString tmpStr; - ASSERT(qd.isValid()); + Q_ASSERT(qd.isValid()); tmpStr.sprintf("%.2d%.2d%.2d", qd.year(), qd.month(), qd.day()); @@ -1420,8 +1422,8 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu) { QString tmpStr; - ASSERT(qdt.date().isValid()); - ASSERT(qdt.time().isValid()); + Q_ASSERT(qdt.date().isValid()); + Q_ASSERT(qdt.time().isValid()); if (zulu && !useLocalTime ) { QDateTime tmpDT = qdt.addSecs ( -KGlobal::locale()->localTimeOffset( qdt )*60); tmpStr.sprintf("%.2d%.2d%.2dT%.2d%.2d%.2dZ", @@ -1454,8 +1456,8 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr) tmpDate.setYMD(year, month, day); tmpTime.setHMS(hour, minute, second); - ASSERT(tmpDate.isValid()); - ASSERT(tmpTime.isValid()); + Q_ASSERT(tmpDate.isValid()); + Q_ASSERT(tmpTime.isValid()); QDateTime tmpDT(tmpDate, tmpTime); // correct for GMT if string is in Zulu format if (dtStr.at(dtStr.length()-1) == 'Z') @@ -1648,7 +1650,7 @@ Attendee::Role VCalFormat::readRole(const char *s) const return role; } -QCString VCalFormat::writeRole(Attendee::Role role) const +Q3CString VCalFormat::writeRole(Attendee::Role role) const { if ( role == Attendee::Chair ) return "OWNER"; @@ -1686,7 +1688,7 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const return status; } -QCString VCalFormat::writeStatus(Attendee::PartStat status) const +Q3CString VCalFormat::writeStatus(Attendee::PartStat status) const { switch(status) { default: diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h index 6dae3d2..cac9634 100644 --- a/libkcal/vcalformat.h +++ b/libkcal/vcalformat.h @@ -23,6 +23,9 @@ #define _VCALFORMAT_H #include "calformat.h" +//Added by qt3to4: +#include +#include #define _VCAL_VERSION "1.0" @@ -95,17 +98,17 @@ class VCalFormat : public CalFormat { const char *dayFromNum(int day); /** the reverse of the above function. */ int numFromDay(const QString &day); - Attendee::Role VCalFormat::readRole(const char *s) const; - QCString writeRole(Attendee::Role role) const; + Attendee::Role readRole(const char *s) const; + Q3CString writeRole(Attendee::Role role) const; Attendee::PartStat readStatus(const char *s) const; - QCString writeStatus(Attendee::PartStat status) const; + Q3CString writeStatus(Attendee::PartStat status) const; private: Calendar *mCalendar; bool useLocalTime; - QPtrList mEventsRelate; // events with relations - QPtrList mTodosRelate; // todos with relations + Q3PtrList mEventsRelate; // events with relations + Q3PtrList mTodosRelate; // todos with relations }; } -- cgit v0.9.0.2