50 files changed, 521 insertions, 449 deletions
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index 3157214..3c4a81c 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp @@ -28,2 +28,4 @@ #include "alarm.h" +//Added by qt3to4: +#include <Q3ValueList> @@ -214,3 +216,3 @@ QString Alarm::programArguments() const void Alarm::setEmailAlarm(const QString &subject, const QString &text, - const QValueList<Person> &addressees, const QStringList &attachments) + const Q3ValueList<Person> &addressees, const QStringList &attachments) { @@ -233,3 +235,3 @@ void Alarm::setMailAddress(const Person &mailAddress) -void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses) +void Alarm::setMailAddresses(const Q3ValueList<Person> &mailAddresses) { @@ -249,5 +251,5 @@ void Alarm::addMailAddress(const Person &mailAddress) -QValueList<Person> Alarm::mailAddresses() const +Q3ValueList<Person> Alarm::mailAddresses() const { - return (mType == Email) ? mMailAddresses : QValueList<Person>(); + return (mType == Email) ? mMailAddresses : Q3ValueList<Person>(); } diff --git a/libkcal/alarm.h b/libkcal/alarm.h index ac6ea0d..b24f0f7 100644 --- a/libkcal/alarm.h +++ b/libkcal/alarm.h @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -41,3 +41,3 @@ class Alarm : public CustomProperties enum Type { Invalid, Display, Procedure, Email, Audio }; - typedef QValueList<Alarm *> List; + typedef Q3ValueList<Alarm *> List; @@ -114,3 +114,3 @@ class Alarm : public CustomProperties */ - void setEmailAlarm(const QString &subject, const QString &text, const QValueList<Person> &addressees, + void setEmailAlarm(const QString &subject, const QString &text, const Q3ValueList<Person> &addressees, const QStringList &attachments = QStringList()); @@ -124,3 +124,3 @@ class Alarm : public CustomProperties */ - void setMailAddresses(const QValueList<Person> &mailAlarmAddresses); + void setMailAddresses(const Q3ValueList<Person> &mailAlarmAddresses); /** Add this address to the list of addresses to send mail to when the alarm is triggered. @@ -130,3 +130,3 @@ class Alarm : public CustomProperties /** return the addresses to send mail to when an alarm goes off */ - QValueList<Person> mailAddresses() const; + Q3ValueList<Person> mailAddresses() const; @@ -228,3 +228,3 @@ class Alarm : public CustomProperties QStringList mMailAttachFiles; // filenames to attach to email - QValueList<Person> mMailAddresses; // who to mail for reminder + Q3ValueList<Person> mMailAddresses; // who to mail for reminder QString mMailSubject; // subject of email diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 9b38d3f..bf095cf 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -32,2 +32,4 @@ #include "syncdefines.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -273,5 +275,5 @@ CalFilter *Calendar::filter() -QPtrList<Incidence> Calendar::incidences() +Q3PtrList<Incidence> Calendar::incidences() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -279,9 +281,9 @@ QPtrList<Incidence> Calendar::incidences() - QPtrList<Event> e = events(); + Q3PtrList<Event> e = events(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList<Todo> t = todos(); + Q3PtrList<Todo> t = todos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); @@ -293,3 +295,3 @@ void Calendar::resetPilotStat(int id ) { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -297,9 +299,9 @@ void Calendar::resetPilotStat(int id ) - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); @@ -308,3 +310,3 @@ void Calendar::resetTempSyncStat() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -312,14 +314,14 @@ void Calendar::resetTempSyncStat() - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); } -QPtrList<Incidence> Calendar::rawIncidences() +Q3PtrList<Incidence> Calendar::rawIncidences() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -327,9 +329,9 @@ QPtrList<Incidence> Calendar::rawIncidences() - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); @@ -339,5 +341,5 @@ QPtrList<Incidence> Calendar::rawIncidences() -QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) +Q3PtrList<Event> Calendar::events( const QDate &date, bool sorted ) { - QPtrList<Event> el = rawEventsForDate(date,sorted); + Q3PtrList<Event> el = rawEventsForDate(date,sorted); mFilter->apply(&el); @@ -346,5 +348,5 @@ QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) -QPtrList<Event> Calendar::events( const QDateTime &qdt ) +Q3PtrList<Event> Calendar::events( const QDateTime &qdt ) { - QPtrList<Event> el = rawEventsForDate(qdt); + Q3PtrList<Event> el = rawEventsForDate(qdt); mFilter->apply(&el); @@ -353,6 +355,6 @@ QPtrList<Event> Calendar::events( const QDateTime &qdt ) -QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, +Q3PtrList<Event> Calendar::events( const QDate &start, const QDate &end, bool inclusive) { - QPtrList<Event> el = rawEvents(start,end,inclusive); + Q3PtrList<Event> el = rawEvents(start,end,inclusive); mFilter->apply(&el); @@ -361,5 +363,5 @@ QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, -QPtrList<Event> Calendar::events() +Q3PtrList<Event> Calendar::events() { - QPtrList<Event> el = rawEvents(); + Q3PtrList<Event> el = rawEvents(); mFilter->apply(&el); @@ -371,3 +373,3 @@ void Calendar::addIncidenceBranch(Incidence *i) Incidence * inc; - QPtrList<Incidence> Relations = i->relations(); + Q3PtrList<Incidence> Relations = i->relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -409,5 +411,5 @@ Incidence* Calendar::incidence( const QString& uid ) -QPtrList<Todo> Calendar::todos() +Q3PtrList<Todo> Calendar::todos() { - QPtrList<Todo> tl = rawTodos(); + Q3PtrList<Todo> tl = rawTodos(); mFilter->apply( &tl ); @@ -457,3 +459,3 @@ void Calendar::removeRelations( Incidence *incidence ) - QPtrList<Incidence> relations = incidence->relations(); + Q3PtrList<Incidence> relations = incidence->relations(); for( Incidence* i = relations.first(); i; i = relations.next() ) @@ -473,3 +475,3 @@ void Calendar::removeRelations( Incidence *incidence ) QString r2uid = incidence->relatedToUid(); - QPtrList<Incidence> tempList; + Q3PtrList<Incidence> tempList; while( Incidence* i = mOrphans[ r2uid ] ) { @@ -489,3 +491,3 @@ void Calendar::removeRelations( Incidence *incidence ) // Removing wasn't that easy - for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { + for( Q3DictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { if( it.current()->uid() == uid ) { diff --git a/libkcal/calendar.h b/libkcal/calendar.h index fbc40ad..5845f44 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -27,4 +27,4 @@ #include <qdatetime.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> @@ -90,3 +90,3 @@ public: virtual void save() = 0; - virtual QPtrList<Event> getExternLastSyncEvents() = 0; + virtual Q3PtrList<Event> getExternLastSyncEvents() = 0; virtual void removeSyncInfo( QString syncProfile) = 0; @@ -157,3 +157,3 @@ public: */ - virtual QPtrList<Incidence> incidences(); + virtual Q3PtrList<Incidence> incidences(); @@ -162,3 +162,3 @@ public: */ - virtual QPtrList<Incidence> rawIncidences(); + virtual Q3PtrList<Incidence> rawIncidences(); @@ -187,3 +187,3 @@ public: */ - QPtrList<Event> events( const QDate &date, bool sorted = false); + Q3PtrList<Event> events( const QDate &date, bool sorted = false); /** @@ -192,3 +192,3 @@ public: */ - QPtrList<Event> events( const QDateTime &qdt ); + Q3PtrList<Event> events( const QDateTime &qdt ); /** @@ -198,3 +198,3 @@ public: */ - QPtrList<Event> events( const QDate &start, const QDate &end, + Q3PtrList<Event> events( const QDate &start, const QDate &end, bool inclusive = false); @@ -203,3 +203,3 @@ public: */ - virtual QPtrList<Event> events(); + virtual Q3PtrList<Event> events(); /** @@ -207,3 +207,3 @@ public: */ - virtual QPtrList<Event> rawEvents() = 0; + virtual Q3PtrList<Event> rawEvents() = 0; @@ -224,3 +224,3 @@ public: */ - virtual QPtrList<Todo> todos(); + virtual Q3PtrList<Todo> todos(); /** @@ -234,3 +234,3 @@ public: */ - virtual QPtrList<Todo> todos( const QDate &date ) = 0; + virtual Q3PtrList<Todo> todos( const QDate &date ) = 0; /** @@ -238,3 +238,3 @@ public: */ - virtual QPtrList<Todo> rawTodos() = 0; + virtual Q3PtrList<Todo> rawTodos() = 0; @@ -250,3 +250,3 @@ public: virtual Journal *journal( const QDate & ) = 0; - virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; + virtual Q3PtrList<Journal> journals4Date( const QDate & ) = 0; /** @@ -258,3 +258,3 @@ public: */ - virtual QPtrList<Journal> journals() = 0; + virtual Q3PtrList<Journal> journals() = 0; @@ -337,3 +337,3 @@ public: */ - virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; + virtual Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; /** @@ -341,3 +341,3 @@ public: */ - virtual QPtrList<Event> rawEventsForDate( const QDate &date, + virtual Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ) = 0; @@ -347,3 +347,3 @@ public: */ - virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + virtual Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ) = 0; @@ -378,4 +378,4 @@ private: // This list is used to put together related todos - QDict<Incidence> mOrphans; - QDict<Incidence> mOrphanUids; + Q3Dict<Incidence> mOrphans; + Q3Dict<Incidence> mOrphanUids; }; diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index ce3cd09..cb52b7c 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -194,3 +194,3 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) // if not in local, add it to default calendar - QPtrList<Incidence> localInc = rawIncidences(); + Q3PtrList<Incidence> localInc = rawIncidences(); Incidence* inL = localInc.first(); @@ -202,3 +202,3 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) } - QPtrList<Incidence> er = remote->rawIncidences(); + Q3PtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); @@ -261,5 +261,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) setSyncEventsEnabled(); - QPtrList<Incidence> incList; + Q3PtrList<Incidence> incList; { - QPtrList<Event> EventList = cal->rawEvents(); + Q3PtrList<Event> EventList = cal->rawEvents(); Event * ev = EventList.first(); @@ -281,3 +281,3 @@ void CalendarLocal::addCalendar( Calendar* cal ) - QPtrList<Todo> TodoList = cal->rawTodos(); + Q3PtrList<Todo> TodoList = cal->rawTodos(); Todo * ev = TodoList.first(); @@ -301,3 +301,3 @@ void CalendarLocal::addCalendar( Calendar* cal ) { - QPtrList<Journal> JournalList = cal->journals(); + Q3PtrList<Journal> JournalList = cal->journals(); Journal * ev = JournalList.first(); @@ -483,5 +483,5 @@ void CalendarLocal::deleteTodo( Todo *todo ) -QPtrList<Todo> CalendarLocal::rawTodos() +Q3PtrList<Todo> CalendarLocal::rawTodos() { - QPtrList<Todo> el; + Q3PtrList<Todo> el; for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) @@ -501,3 +501,3 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) { - QPtrList<Incidence> all = rawIncidences() ; + Q3PtrList<Incidence> all = rawIncidences() ; Incidence *inc; @@ -507,3 +507,3 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) if ( syncProfile.isEmpty() ) { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; @@ -522,5 +522,5 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) } -QPtrList<Event> CalendarLocal::getExternLastSyncEvents() +Q3PtrList<Event> CalendarLocal::getExternLastSyncEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; @@ -687,5 +687,5 @@ void CalendarLocal::deRegisterAlarm() -QPtrList<Todo> CalendarLocal::todos( const QDate &date ) +Q3PtrList<Todo> CalendarLocal::todos( const QDate &date ) { - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; @@ -788,3 +788,3 @@ void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; @@ -807,3 +807,3 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; @@ -846,5 +846,5 @@ void CalendarLocal::insertEvent( Event *event ) -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) { - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; @@ -880,3 +880,3 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) // now, we have to sort it based on dtStart.time() - QPtrList<Event> eventListSorted; + Q3PtrList<Event> eventListSorted; Event *sortEvent; @@ -896,3 +896,3 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) -QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, +Q3PtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool inclusive ) @@ -901,3 +901,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; @@ -925,3 +925,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool founOne; - QDate next = event->getNextOccurence( start, &founOne ).date(); + QDate next = event->getNextOccurence( (QDateTime)start, &founOne ).date(); if ( founOne ) { @@ -974,3 +974,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) { @@ -979,5 +979,5 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) -QPtrList<Event> CalendarLocal::rawEvents() +Q3PtrList<Event> CalendarLocal::rawEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; for ( Event *it = mEventList.first(); it; it = mEventList.next() ) @@ -1008,5 +1008,5 @@ void CalendarLocal::deleteJournal( Journal *journal ) -QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) +Q3PtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) @@ -1042,5 +1042,5 @@ Journal *CalendarLocal::journal( const QString &uid ) -QPtrList<Journal> CalendarLocal::journals() +Q3PtrList<Journal> CalendarLocal::journals() { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) @@ -1053,3 +1053,3 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Event> EventList = mEventList; + Q3PtrList<Event> EventList = mEventList; Event * ev = EventList.first(); @@ -1063,3 +1063,3 @@ void CalendarLocal::setCalendarRemove( int id ) - QPtrList<Todo> TodoList = mTodoList; + Q3PtrList<Todo> TodoList = mTodoList; Todo * ev = TodoList.first(); @@ -1072,3 +1072,3 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Journal> JournalList = mJournalList; + Q3PtrList<Journal> JournalList = mJournalList; Journal * ev = JournalList.first(); diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 1ceabce..1df65c7 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -25,2 +25,4 @@ #include "calendar.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -95,4 +97,4 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEvents(); - QPtrList<Event> getExternLastSyncEvents(); + Q3PtrList<Event> rawEvents(); + Q3PtrList<Event> getExternLastSyncEvents(); /** @@ -114,3 +116,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> rawTodos(); + Q3PtrList<Todo> rawTodos(); /** @@ -118,3 +120,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> todos( const QDate &date ); + Q3PtrList<Todo> todos( const QDate &date ); /** @@ -124,3 +126,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> todos() { return Calendar::todos(); } + Q3PtrList<Todo> todos() { return Calendar::todos(); } @@ -138,3 +140,3 @@ class CalendarLocal : public Calendar Journal *journal( const QDate & ); - QPtrList<Journal> journals4Date( const QDate & ); + Q3PtrList<Journal> journals4Date( const QDate & ); /** @@ -146,3 +148,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Journal> journals(); + Q3PtrList<Journal> journals(); @@ -176,3 +178,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); + Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); /** @@ -180,3 +182,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); + Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ); /** @@ -185,3 +187,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ); @@ -226,5 +228,5 @@ public slots: - QPtrList<Event> mEventList; - QPtrList<Todo> mTodoList; - QPtrList<Journal> mJournalList; + Q3PtrList<Event> mEventList; + Q3PtrList<Todo> mTodoList; + Q3PtrList<Journal> mJournalList; }; diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp index 72f70c2..fa1dbd5 100644 --- a/libkcal/calfilter.cpp +++ b/libkcal/calfilter.cpp @@ -23,2 +23,4 @@ #include "calfilter.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -43,3 +45,3 @@ CalFilter::~CalFilter() -void CalFilter::apply(QPtrList<Event> *eventlist) +void CalFilter::apply(Q3PtrList<Event> *eventlist) { @@ -63,3 +65,3 @@ void CalFilter::apply(QPtrList<Event> *eventlist) // TODO: avoid duplicating apply() code -void CalFilter::apply(QPtrList<Todo> *eventlist) +void CalFilter::apply(Q3PtrList<Todo> *eventlist) { diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index e349770..821149f 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -57,3 +57,3 @@ class CalFilter { */ - void apply(QPtrList<Event> *eventlist); + void apply(Q3PtrList<Event> *eventlist); @@ -63,5 +63,5 @@ class CalFilter { */ - void apply(QPtrList<Todo> *todolist); - bool CalFilter::filterCalendarItem(Incidence *in); - bool CalFilter::filterJournal(Journal *in); + void apply(Q3PtrList<Todo> *todolist); + bool filterCalendarItem(Incidence *in); + bool filterJournal(Journal *in); /** diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index adc1710..16f4a28 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp @@ -21,2 +21,4 @@ #include "customproperties.h" +//Added by qt3to4: +#include <Q3CString> @@ -37,3 +39,3 @@ CustomProperties::~CustomProperties() -void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, +void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value) @@ -42,3 +44,3 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke return; - QCString property = "X-KDE-" + app + "-" + key; + Q3CString property = "X-KDE-" + app + "-" + key; if (!checkName(property)) @@ -48,13 +50,13 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke -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) { @@ -65,5 +67,5 @@ void CustomProperties::setNonKDECustomProperty(const QCString &name, const QStri -void CustomProperties::removeNonKDECustomProperty(const QCString &name) +void CustomProperties::removeNonKDECustomProperty(const Q3CString &name) { - QMap<QCString, QString>::Iterator it = mProperties.find(name); + QMap<Q3CString, QString>::Iterator it = mProperties.find(name); if (it != mProperties.end()) @@ -72,5 +74,5 @@ void CustomProperties::removeNonKDECustomProperty(const QCString &name) -QString CustomProperties::nonKDECustomProperty(const QCString &name) const +QString CustomProperties::nonKDECustomProperty(const Q3CString &name) const { - QMap<QCString, QString>::ConstIterator it = mProperties.find(name); + QMap<Q3CString, QString>::ConstIterator it = mProperties.find(name); if (it == mProperties.end()) @@ -80,5 +82,5 @@ QString CustomProperties::nonKDECustomProperty(const QCString &name) const -void CustomProperties::setCustomProperties(const QMap<QCString, QString> &properties) +void CustomProperties::setCustomProperties(const QMap<Q3CString, QString> &properties) { - for (QMap<QCString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { + for (QMap<Q3CString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { // Validate the property name and convert any null string to empty string @@ -90,3 +92,3 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper -QMap<QCString, QString> CustomProperties::customProperties() const +QMap<Q3CString, QString> CustomProperties::customProperties() const { @@ -95,3 +97,3 @@ QMap<QCString, QString> CustomProperties::customProperties() const -bool CustomProperties::checkName(const QCString &name) +bool CustomProperties::checkName(const Q3CString &name) { diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h index 0cbfdcd..75eb3ad 100644 --- a/libkcal/customproperties.h +++ b/libkcal/customproperties.h @@ -25,2 +25,4 @@ #include <qmap.h> +//Added by qt3to4: +#include <Q3CString> @@ -51,3 +53,3 @@ class CustomProperties */ - void setCustomProperty(const QCString &app, const QCString &key, + void setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value); @@ -57,3 +59,3 @@ class CustomProperties */ - void removeCustomProperty(const QCString &app, const QCString &key); + void removeCustomProperty(const Q3CString &app, const Q3CString &key); /** Return the value of a custom calendar property. @@ -63,3 +65,3 @@ class CustomProperties */ - QString customProperty(const QCString &app, const QCString &key) const; + QString customProperty(const Q3CString &app, const Q3CString &key) const; @@ -70,3 +72,3 @@ class CustomProperties */ - 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. @@ -74,3 +76,3 @@ class CustomProperties */ - void removeNonKDECustomProperty(const QCString &name); + void removeNonKDECustomProperty(const Q3CString &name); /** Return the value of a non-KDE or non-standard custom calendar property. @@ -79,3 +81,3 @@ class CustomProperties */ - QString nonKDECustomProperty(const QCString& name) const; + QString nonKDECustomProperty(const Q3CString& name) const; @@ -84,10 +86,10 @@ class CustomProperties */ - void setCustomProperties(const QMap<QCString, QString> &properties); + void setCustomProperties(const QMap<Q3CString, QString> &properties); /** Return all custom calendar property key/value pairs. */ - QMap<QCString, QString> customProperties() const; + QMap<Q3CString, QString> customProperties() const; private: - static bool checkName(const QCString& name); + static bool checkName(const Q3CString& name); - QMap<QCString, QString> mProperties; // custom calendar properties + QMap<Q3CString, QString> 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 @@ -24,2 +24,5 @@ #include <qclipboard.h> +//Added by qt3to4: +#include <QDropEvent> +#include <Q3PtrList> @@ -70,3 +73,3 @@ Event *DndFactory::createDrop(QDropEvent *de) - QPtrList<Event> events = cal.events(); + Q3PtrList<Event> events = cal.events(); if ( !events.isEmpty() ) { @@ -89,3 +92,3 @@ Todo *DndFactory::createDropTodo(QDropEvent *de) - QPtrList<Todo> todos = cal.todos(); + Q3PtrList<Todo> todos = cal.todos(); if ( !todos.isEmpty() ) { @@ -135,3 +138,3 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime - QPtrList<Incidence> incList = cal.incidences(); + Q3PtrList<Incidence> incList = cal.incidences(); Incidence *inc = incList.first(); diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h index 2df5259..a873c37 100644 --- a/libkcal/dndfactory.h +++ b/libkcal/dndfactory.h @@ -1 +1,3 @@ +//Added by qt3to4: +#include <QDropEvent> /* 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 @@ -27,2 +27,4 @@ #include "vcalformat.h" +//Added by qt3to4: +#include <QDropEvent> diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp index ae40e6d..73eb3d0 100644 --- a/libkcal/dummyscheduler.cpp +++ b/libkcal/dummyscheduler.cpp @@ -25,3 +25,5 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -70,4 +72,4 @@ 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; @@ -80,8 +82,8 @@ bool DummyScheduler::saveMessage(const QString &message) -QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() +Q3PtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() { - QPtrList<ScheduleMessage> messageList; + Q3PtrList<ScheduleMessage> messageList; QFile f("dummyscheduler.store"); - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file" @@ -89,3 +91,3 @@ QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString; diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h index df42153..f86d583 100644 --- a/libkcal/dummyscheduler.h +++ b/libkcal/dummyscheduler.h @@ -26,2 +26,4 @@ #include "scheduler.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -41,3 +43,3 @@ class DummyScheduler : public Scheduler { bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients); - QPtrList<ScheduleMessage> retrieveTransactions(); + Q3PtrList<ScheduleMessage> retrieveTransactions(); diff --git a/libkcal/event.cpp b/libkcal/event.cpp index fdf5657..060df81 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -386,3 +386,3 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { diff --git a/libkcal/event.h b/libkcal/event.h index 6a58618..da44f81 100644 --- a/libkcal/event.h +++ b/libkcal/event.h @@ -27,2 +27,4 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -42,3 +44,3 @@ class Event : public Incidence - QCString type() const { return "Event"; } + Q3CString type() const { return "Event"; } IncTypeID typeID() const { return eventID; } diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp index a139124..3d1309f 100644 --- a/libkcal/filestorage.cpp +++ b/libkcal/filestorage.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp index ba15d6d..e4e9ec9 100644 --- a/libkcal/freebusy.cpp +++ b/libkcal/freebusy.cpp @@ -23,2 +23,5 @@ #include "freebusy.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -45,3 +48,3 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime //Gets all the events in the calendar - QPtrList<Event> eventList = mCalendar->events(); + Q3PtrList<Event> eventList = mCalendar->events(); Event *event; @@ -115,3 +118,3 @@ QDateTime FreeBusy::dtEnd() const -QValueList<Period> FreeBusy::busyPeriods() const +Q3ValueList<Period> FreeBusy::busyPeriods() const { @@ -148,3 +151,3 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even -FreeBusy::FreeBusy(QValueList<Period> busyPeriods) +FreeBusy::FreeBusy(Q3ValueList<Period> busyPeriods) { @@ -155,3 +158,3 @@ void FreeBusy::sortList() { - typedef QValueList<Period> PeriodList; + typedef Q3ValueList<Period> PeriodList; diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h index d741c72..bd14cb7 100644 --- a/libkcal/freebusy.h +++ b/libkcal/freebusy.h @@ -26,4 +26,6 @@ #include <qdatetime.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -45,3 +47,3 @@ class FreeBusy : public IncidenceBase FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); - FreeBusy(QValueList<Period> busyPeriods); + FreeBusy(Q3ValueList<Period> busyPeriods); @@ -49,3 +51,3 @@ class FreeBusy : public IncidenceBase - QCString type() const { return "FreeBusy"; } + Q3CString type() const { return "FreeBusy"; } IncTypeID typeID() const { return freebusyID; } @@ -55,3 +57,3 @@ class FreeBusy : public IncidenceBase - QValueList<Period> busyPeriods() const; + Q3ValueList<Period> busyPeriods() const; @@ -66,3 +68,3 @@ class FreeBusy : public IncidenceBase QDateTime mDtEnd; - QValueList<Period> mBusyPeriods; + Q3ValueList<Period> 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 @@ -30,3 +30,3 @@ using namespace KCal; ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/calendar", parent, name ) + : Q3StoredDrag( "text/calendar", parent, name ) { diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h index fdf32b7..c1f73f4 100644 --- a/libkcal/icaldrag.h +++ b/libkcal/icaldrag.h @@ -24,3 +24,3 @@ -#include <qdragobject.h> +#include <q3dragobject.h> #include "calendar.h" @@ -30,3 +30,3 @@ namespace KCal { /** iCalendar drag&drop class. */ -class ICalDrag : public QStoredDrag +class ICalDrag : public Q3StoredDrag { diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 6f3a799..3829bc1 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -22,3 +22,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -26,3 +26,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -72,3 +72,3 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { setException(new ErrorFormat(ErrorFormat::LoadError)); @@ -76,6 +76,6 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); QString text; - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); text = ts.read(); @@ -100,3 +100,3 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, @@ -105,5 +105,5 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); ts << text; @@ -158,3 +158,3 @@ Incidence *ICalFormat::fromString( const QString &text ) Incidence *ical = 0; - QPtrList<Event> elist = cal.events(); + Q3PtrList<Event> elist = cal.events(); if ( elist.count() > 0 ) { @@ -162,3 +162,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } else { - QPtrList<Todo> tlist = cal.todos(); + Q3PtrList<Todo> tlist = cal.todos(); if ( tlist.count() > 0 ) { @@ -166,3 +166,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } else { - QPtrList<Journal> jlist = cal.journals(); + Q3PtrList<Journal> jlist = cal.journals(); if ( jlist.count() > 0 ) { @@ -174,3 +174,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } -#include <qapp.h> +#include <qapplication.h> @@ -186,4 +186,4 @@ QString ICalFormat::toString( Calendar *cal ) // todos - QPtrList<Todo> todoList = cal->rawTodos(); - QPtrListIterator<Todo> qlt(todoList); + Q3PtrList<Todo> todoList = cal->rawTodos(); + Q3PtrListIterator<Todo> qlt(todoList); for (; qlt.current(); ++qlt) { @@ -198,3 +198,3 @@ QString ICalFormat::toString( Calendar *cal ) // events - QPtrList<Event> events = cal->rawEvents(); + Q3PtrList<Event> events = cal->rawEvents(); Event *ev; @@ -209,3 +209,3 @@ QString ICalFormat::toString( Calendar *cal ) // journals - QPtrList<Journal> journals = cal->journals(); + Q3PtrList<Journal> journals = cal->journals(); Journal *j; diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h index a770dbb..a454b35 100644 --- a/libkcal/icalformat.h +++ b/libkcal/icalformat.h @@ -23,2 +23,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3CString> @@ -108,3 +110,3 @@ class ICalFormat : public CalFormat { QString mTimeZoneId; - QCString mTzString; + Q3CString mTzString; int tzOffsetMin; diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 65eabc8..ea144ee 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -22,4 +22,7 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> @@ -223,4 +226,4 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy, //Loops through all the periods in the freebusy object - QValueList<Period> list = freebusy->busyPeriods(); - QValueList<Period>::Iterator it; + Q3ValueList<Period> list = freebusy->busyPeriods(); + Q3ValueList<Period>::Iterator it; icalperiodtype period; @@ -386,3 +389,3 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) // attachments - QPtrList<Attachment> attachments = incidence->attachments(); + Q3PtrList<Attachment> attachments = incidence->attachments(); for (Attachment *at = attachments.first(); at; at = attachments.next()) @@ -391,3 +394,3 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) // alarms - QPtrList<Alarm> alarms = incidence->alarms(); + Q3PtrList<Alarm> alarms = incidence->alarms(); Alarm* alarm; @@ -425,4 +428,4 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc if (incidenceBase->attendeeCount() != 0) { - QPtrList<Attendee> al = incidenceBase->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = incidenceBase->attendees(); + Q3PtrListIterator<Attendee> ai(al); for (; ai.current(); ++ai) { @@ -438,4 +441,4 @@ void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomPropertie { - QMap<QCString, QString> custom = properties->customProperties(); - for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap<Q3CString, QString> custom = properties->customProperties(); + for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); @@ -548,4 +551,4 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur) - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; @@ -706,4 +709,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) action = ICAL_ACTION_EMAIL; - QValueList<Person> addresses = alarm->mailAddresses(); - for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { + Q3ValueList<Person> addresses = alarm->mailAddresses(); + for (Q3ValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8()); @@ -765,4 +768,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) // Custom properties - QMap<QCString, QString> custom = alarm->customProperties(); - for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap<Q3CString, QString> custom = alarm->customProperties(); + for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); @@ -1341,3 +1344,3 @@ void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties { - QMap<QCString, QString> customProperties; + QMap<Q3CString, QString> customProperties; diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h index 203c302..3a35b4c 100644 --- a/libkcal/icalformatimpl.h +++ b/libkcal/icalformatimpl.h @@ -23,2 +23,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -95,4 +97,4 @@ class ICalFormatImpl { - QPtrList<Event> mEventsRelate; // events with relations - QPtrList<Todo> mTodosRelate; // todos with relations + Q3PtrList<Event> mEventsRelate; // events with relations + Q3PtrList<Todo> mTodosRelate; // todos with relations diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp index e186f8e..e6d56a6 100644 --- a/libkcal/imipscheduler.cpp +++ b/libkcal/imipscheduler.cpp @@ -28,2 +28,4 @@ #include "imipscheduler.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -52,5 +54,5 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method) -QPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() +Q3PtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() { - QPtrList<ScheduleMessage> messageList; + Q3PtrList<ScheduleMessage> messageList; diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h index f142060..5a2d38e 100644 --- a/libkcal/imipscheduler.h +++ b/libkcal/imipscheduler.h @@ -25,3 +25,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -42,3 +42,3 @@ class IMIPScheduler : public Scheduler { bool performTransaction(IncidenceBase *incidence,Method method); - QPtrList<ScheduleMessage> retrieveTransactions(); + Q3PtrList<ScheduleMessage> retrieveTransactions(); }; diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 7dd9bd2..8fcdc69 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -28,2 +28,4 @@ #include "todo.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -61,3 +63,3 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mExDates = i.mExDates; - QPtrListIterator<Attachment> itat( i.mAttachments ); + Q3PtrListIterator<Attachment> itat( i.mAttachments ); Attachment *at; @@ -75,3 +77,3 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mHasStartDate = i.mHasStartDate; - QPtrListIterator<Alarm> it( i.mAlarms ); + Q3PtrListIterator<Alarm> it( i.mAlarms ); const Alarm *a; @@ -100,3 +102,3 @@ Incidence::~Incidence() Incidence *ev; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (ev=Relations.first();ev;ev=Relations.next()) { @@ -218,4 +220,4 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) #if 0 - QPtrListIterator<Alarm> a1( i1.alarms() ); - QPtrListIterator<Alarm> a2( i2.alarms() ); + Q3PtrListIterator<Alarm> a1( i1.alarms() ); + Q3PtrListIterator<Alarm> a2( i2.alarms() ); for( ; a1.current() && a2.current(); ++a1, ++a2 ) { @@ -324,3 +326,3 @@ void Incidence::cloneRelations( Incidence * newInc ) Incidence * cloneInc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -358,3 +360,3 @@ QDateTime Incidence::lastModifiedSub() Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -449,3 +451,3 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -464,3 +466,3 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -552,3 +554,3 @@ Incidence *Incidence::relatedTo() const -QPtrList<Incidence> Incidence::relations() const +Q3PtrList<Incidence> Incidence::relations() const { @@ -557,6 +559,6 @@ QPtrList<Incidence> Incidence::relations() const -void Incidence::addRelationsToList(QPtrList<Incidence> *rel) +void Incidence::addRelationsToList(Q3PtrList<Incidence> *rel) { Incidence* inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -649,3 +651,3 @@ void Incidence::deleteAttachments(const QString& mime) -QPtrList<Attachment> Incidence::attachments() const +Q3PtrList<Attachment> Incidence::attachments() const { @@ -654,6 +656,6 @@ QPtrList<Attachment> Incidence::attachments() const -QPtrList<Attachment> Incidence::attachments(const QString& mime) const +Q3PtrList<Attachment> Incidence::attachments(const QString& mime) const { - QPtrList<Attachment> attachments; - QPtrListIterator<Attachment> it( mAttachments ); + Q3PtrList<Attachment> attachments; + Q3PtrListIterator<Attachment> it( mAttachments ); Attachment *at; @@ -739,3 +741,3 @@ QStringList Incidence::secrecyList() -QPtrList<Alarm> Incidence::alarms() const +Q3PtrList<Alarm> Incidence::alarms() const { @@ -773,3 +775,3 @@ bool Incidence::isAlarmEnabled() const Alarm* alarm; - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f89942f..2940129 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -27,3 +27,5 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -115,3 +117,3 @@ class Incidence : public IncidenceBase virtual void cloneRelations( Incidence * ); - void addRelationsToList(QPtrList<Incidence> *rel); + void addRelationsToList(Q3PtrList<Incidence> *rel); void clearRelations(); @@ -179,3 +181,3 @@ class Incidence : public IncidenceBase /** All events that are related to this event */ - QPtrList<Incidence> relations() const; + Q3PtrList<Incidence> relations() const; /** Add an event which is related to this event */ @@ -204,5 +206,5 @@ class Incidence : public IncidenceBase /** return list of all associated attachments */ - QPtrList<Attachment> attachments() const; + Q3PtrList<Attachment> attachments() const; /** find a list of attachments with this mime type */ - QPtrList<Attachment> attachments(const QString& mime) const; + Q3PtrList<Attachment> attachments(const QString& mime) const; @@ -237,3 +239,3 @@ class Incidence : public IncidenceBase /** All alarms that are associated with this incidence */ - QPtrList<Alarm> alarms() const; + Q3PtrList<Alarm> alarms() const; /** Create a new alarm which is associated with this incidence */ @@ -290,4 +292,4 @@ class Incidence : public IncidenceBase protected: - QPtrList<Alarm> mAlarms; - QPtrList<Incidence> mRelations; + Q3PtrList<Alarm> mAlarms; + Q3PtrList<Incidence> mRelations; QDateTime mRecurrenceID; @@ -310,3 +312,3 @@ protected: DateList mExDates; - QPtrList<Attachment> mAttachments; + Q3PtrList<Attachment> mAttachments; QStringList mResources; diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 56c0560..f11ec54 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -29,2 +29,4 @@ #include "incidencebase.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -66,3 +68,3 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : mCalID = i.mCalID; - QPtrList<Attendee> attendees = i.attendees(); + Q3PtrList<Attendee> attendees = i.attendees(); for( Attendee *a = attendees.first(); a; a = attendees.next() ) { @@ -302,3 +304,3 @@ bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -345,3 +347,3 @@ Attendee *IncidenceBase::getAttendee(const char *n) const { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -359,3 +361,3 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email) { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -372,3 +374,3 @@ Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QStrin { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -493,3 +495,3 @@ void IncidenceBase::updated() { - QPtrListIterator<Observer> it(mObservers); + Q3PtrListIterator<Observer> it(mObservers); while( it.current() ) { diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 3edc03b..d97f524 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h @@ -27,4 +27,6 @@ #include <qstringlist.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -35,3 +37,3 @@ namespace KCal { -typedef QValueList<QDate> DateList; +typedef Q3ValueList<QDate> DateList; enum IncTypeID { eventID,todoID,journalID,freebusyID }; @@ -53,3 +55,3 @@ class IncidenceBase : public CustomProperties - virtual QCString type() const = 0; + virtual Q3CString type() const = 0; virtual IncTypeID typeID() const = 0; @@ -111,3 +113,3 @@ class IncidenceBase : public CustomProperties /** Return list of attendees. */ - QPtrList<Attendee> attendees() const { return mAttendees; }; + Q3PtrList<Attendee> attendees() const { return mAttendees; }; /** Return number of attendees. */ @@ -170,3 +172,3 @@ class IncidenceBase : public CustomProperties QDateTime mLastModified; - QPtrList<Attendee> mAttendees; + Q3PtrList<Attendee> mAttendees; @@ -183,3 +185,3 @@ class IncidenceBase : public CustomProperties - QPtrList<Observer> mObservers; + Q3PtrList<Observer> mObservers; }; diff --git a/libkcal/journal.h b/libkcal/journal.h index 1cd0a22..c83356f 100644 --- a/libkcal/journal.h +++ b/libkcal/journal.h @@ -26,2 +26,4 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> @@ -38,3 +40,3 @@ class Journal : public Incidence - QCString type() const { return "Journal"; } + Q3CString type() const { return "Journal"; } IncTypeID typeID() const { return journalID; } diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 733b897..bce68b0 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -6,2 +6,4 @@ #include <kabc/stdaddressbook.h> +//Added by qt3to4: +#include <Q3PtrList> #define size count @@ -312,3 +314,3 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; @@ -341,3 +343,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { @@ -364,3 +366,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; @@ -404,3 +406,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro index 33c63c3..1f43b10 100644 --- a/libkcal/libkcal.pro +++ b/libkcal/libkcal.pro @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal @@ -108 +108,5 @@ dndfactory.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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal diff --git a/libkcal/listbase.h b/libkcal/listbase.h index 085b13d..6c942ef 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h @@ -23,3 +23,5 @@ -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -33,3 +35,3 @@ namespace KCal { template<class T> -class ListBase : public QValueList<T *> +class ListBase : public Q3ValueList<T *> { @@ -37,3 +39,3 @@ class ListBase : public QValueList<T *> ListBase() - : QValueList<T *>(), mAutoDelete( false ) + : Q3ValueList<T *>(), mAutoDelete( false ) { @@ -42,3 +44,3 @@ class ListBase : public QValueList<T *> ListBase( const ListBase &l ) - : QValueList<T *>( l ), mAutoDelete( false ) + : Q3ValueList<T *>( l ), mAutoDelete( false ) { @@ -49,4 +51,4 @@ class ListBase : public QValueList<T *> if ( mAutoDelete ) { - QValueListIterator<T *> it; - for( it = QValueList<T*>::begin(); it != QValueList<T*>::end(); ++it ) { + Q3ValueListIterator<T *> it; + for( it = Q3ValueList<T*>::begin(); it != Q3ValueList<T*>::end(); ++it ) { delete *it; @@ -59,3 +61,3 @@ class ListBase : public QValueList<T *> if ( this == &l ) return *this; - QValueList<T *>::operator=( l ); + Q3ValueList<T *>::operator=( l ); return *this; @@ -70,4 +72,4 @@ class ListBase : public QValueList<T *> { - QValueListIterator<T *> it = find( t ); - if ( it == QValueList<T*>::end() ) { + Q3ValueListIterator<T *> it = find( t ); + if ( it == Q3ValueList<T*>::end() ) { return false; @@ -79,4 +81,4 @@ class ListBase : public QValueList<T *> } - void fill ( QPtrList<T> list ) { - QPtrListIterator<T> it (list); + void fill ( Q3PtrList<T> list ) { + Q3PtrListIterator<T> it (list); T *item; diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 900fc04..794e4b4 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -24,3 +24,3 @@ #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,3 +29,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -33,2 +33,3 @@ #include <qlabel.h> +#include <QDesktopWidget> @@ -203,3 +204,3 @@ ulong PhoneFormat::getCsumEvent( Event* event ) int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); @@ -243,3 +244,3 @@ ulong PhoneFormat::getCsumEvent( Event* event ) list.append( "1" ); - list.append( PhoneParser::dtToString( rec->endDate()) ); + list.append( PhoneParser::dtToString( (QDateTime)rec->endDate()) ); } else { @@ -307,3 +308,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) return false; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -342,3 +343,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) qDebug("reading todos... "); - QPtrList<Todo> tr = calendar->rawTodos(); + Q3PtrList<Todo> tr = calendar->rawTodos(); Todo* ev = tr.first(); @@ -467,3 +468,3 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from ) } -#include <qcstring.h> +#include <q3cstring.h> @@ -499,3 +500,3 @@ bool PhoneFormat::save( Calendar *calendar) // 1 remove events which should be deleted - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -510,3 +511,3 @@ bool PhoneFormat::save( Calendar *calendar) // 2 remove todos which should be deleted - QPtrList<Todo> tl = calendar->rawTodos(); + Q3PtrList<Todo> tl = calendar->rawTodos(); Todo* to = tl.first(); @@ -554,3 +555,3 @@ bool PhoneFormat::save( Calendar *calendar) message = i18n(" Comparing event # "); - QPtrList<Event> er1 = calendarTemp->rawEvents(); + Q3PtrList<Event> er1 = calendarTemp->rawEvents(); Event* ev1; @@ -582,3 +583,3 @@ bool PhoneFormat::save( Calendar *calendar) procCount = 0; - QPtrList<Todo> tl1 = calendarTemp->rawTodos(); + Q3PtrList<Todo> tl1 = calendarTemp->rawTodos(); Todo* to1 ; diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 0a4a031..2dfe1a4 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -23,3 +23,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -27,3 +27,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qxml.h> @@ -311,3 +311,3 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, @@ -316,3 +316,3 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 6ee5499..9a4e540 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -31,2 +31,5 @@ #include "recurrence.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -58,3 +61,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) rWeekStart(r.rWeekStart), - rDays(r.rDays.copy()), + rDays(r.rDays), rFreq(r.rFreq), @@ -72,3 +75,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) { - for (QPtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { + for (Q3PtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { rMonthPos *tmp = new rMonthPos; @@ -76,6 +79,6 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) tmp->negative = mp.current()->negative; - tmp->rDays = mp.current()->rDays.copy(); + tmp->rDays = mp.current()->rDays; rMonthPositions.append(tmp); } - for (QPtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { + for (Q3PtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { int *tmp = new int; @@ -84,3 +87,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) } - for (QPtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { + for (Q3PtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { int *tmp = new int; @@ -126,4 +129,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyPos: { - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -135,4 +138,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyDay: { - QPtrList<int> MonthDays = rMonthDays ; - QPtrList<int> MonthDays2 = r2.rMonthDays ; + Q3PtrList<int> MonthDays = rMonthDays ; + Q3PtrList<int> MonthDays2 = r2.rMonthDays ; if ( !MonthDays.count() ) @@ -145,8 +148,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; if ( *YearNums.first() != *YearNums2.first() ) return false; - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -159,4 +162,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyMonth: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType); @@ -164,4 +167,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyDay: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() ); @@ -359,3 +362,3 @@ QDateTime Recurrence::endDateTime() const case rDaily: - return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); + return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); @@ -508,3 +511,3 @@ const QBitArray &Recurrence::days() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const { @@ -513,3 +516,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const { @@ -518,3 +521,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const -const QPtrList<int> &Recurrence::monthDays() const +const Q3PtrList<int> &Recurrence::monthDays() const { @@ -761,3 +764,3 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays) -const QPtrList<int> &Recurrence::yearNums() const +const Q3PtrList<int> &Recurrence::yearNums() const { @@ -1049,3 +1052,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const // The date queried falls within the range of the event. - QValueList<int> days; + Q3ValueList<int> days; int daysInMonth = qd.daysInMonth(); @@ -1055,3 +1058,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1103,3 +1106,3 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const int i = qmonth; - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1129,8 +1132,8 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const // The date queried falls within the range of the event. - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (month == *qlin.current()) { // The month recurs - QValueList<int> days; + Q3ValueList<int> days; getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1159,3 +1162,3 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const int i = qd.dayOfYear(); - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1551,3 +1554,3 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const if (count == 0) - endtime = QDate(); + endtime = QDateTime(); else if (timed) @@ -1795,4 +1798,4 @@ struct Recurrence::MonthlyData { private: - QValueList<int> days28, days29, days30, days31; // recurring days in months of each length - QValueList<int> *recurDays[4]; + Q3ValueList<int> days28, days29, days30, days31; // recurring days in months of each length + Q3ValueList<int> *recurDays[4]; public: @@ -1807,3 +1810,3 @@ struct Recurrence::MonthlyData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { if (!varies) @@ -1812,3 +1815,3 @@ struct Recurrence::MonthlyData { int daysInMonth = startOfMonth.daysInMonth(); - QValueList<int>* days = recurDays[daysInMonth - 28]; + Q3ValueList<int>* days = recurDays[daysInMonth - 28]; if (recurrence->recurs == rMonthlyPos) @@ -1846,4 +1849,4 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1912,4 +1915,4 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1971,4 +1974,4 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + enddate.month() - 1; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -2054,4 +2057,4 @@ struct Recurrence::YearlyMonthData { private: - QValueList<int> months; // recurring months in non-leap years 1..12 - QValueList<int> leapMonths; // recurring months in leap years 1..12 + Q3ValueList<int> months; // recurring months in non-leap years 1..12 + Q3ValueList<int> leapMonths; // recurring months in leap years 1..12 public: @@ -2062,5 +2065,5 @@ struct Recurrence::YearlyMonthData { } - const QValueList<int>* monthList() const + const Q3ValueList<int>* monthList() const { return leapyear ? &leapMonths : &months; } - const QValueList<int>* leapMonthList() const { return &leapMonths; } + const Q3ValueList<int>* leapMonthList() const { return &leapMonths; } QDate date() const { return QDate(year, month, day); } @@ -2090,4 +2093,4 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); // get recurring months for this year + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); // get recurring months for this year @@ -2201,4 +2204,4 @@ int Recurrence::yearlyMonthCalcToDate(const QDate &enddate, YearlyMonthData &dat } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2272,4 +2275,4 @@ int Recurrence::yearlyMonthCalcNextAfter(QDate &enddate, YearlyMonthData &data) } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2392,3 +2395,3 @@ struct Recurrence::YearlyPosData { private: - mutable QValueList<int> days; + mutable Q3ValueList<int> days; public: @@ -2400,3 +2403,3 @@ struct Recurrence::YearlyPosData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { QDate startOfMonth(year, month, 1); @@ -2430,4 +2433,4 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const int countGone = 0; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2435,3 +2438,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2468,3 +2471,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2498,3 +2501,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (static_cast<uint>(data.daysPerMonth) >= countTogo) { @@ -2533,4 +2536,4 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2538,3 +2541,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2578,3 +2581,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2613,3 +2616,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2648,4 +2651,4 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2655,3 +2658,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the next year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2691,3 +2694,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2736,3 +2739,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2810,3 +2813,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2848,3 +2851,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2871,3 +2874,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2910,3 +2913,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { if (*it.current() > endDay) @@ -2930,3 +2933,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2979,3 +2982,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2997,3 +3000,3 @@ ex: // startDayOfWeek = day of week for first day of month. -void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int startDayOfWeek) const +void Recurrence::getMonthlyPosDays(Q3ValueList<int> &list, int daysInMonth, int startDayOfWeek) const { @@ -3003,3 +3006,3 @@ void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int s Q_UINT32 days = 0; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos - 1; // get 0-based week number @@ -3041,3 +3044,3 @@ int Recurrence::countMonthlyPosDays() const Q_UINT8 negative[4] = { 0, 0, 0, 0 }; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos; @@ -3074,3 +3077,3 @@ int Recurrence::countMonthlyPosDays() const // Reply = true if day numbers varies from month to month. -bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const +bool Recurrence::getMonthlyDayDays(Q3ValueList<int> &list, int daysInMonth) const { @@ -3079,3 +3082,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const Q_UINT32 days = 0; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3108,3 +3111,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const // Reply = true if February 29th also recurs. -bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList<int> &leaplist) const +bool Recurrence::getYearlyMonthMonths(int day, Q3ValueList<int> &list, Q3ValueList<int> &leaplist) const { @@ -3113,3 +3116,3 @@ bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList bool feb29 = false; - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int month = *it.current(); @@ -3189,3 +3192,3 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const int minday = daysInMonth + 1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3203,5 +3206,5 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const QDate monthBegin(earliestDate.addDays(1 - earliestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3226,3 +3229,3 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const int maxday = -1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3240,5 +3243,5 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const QDate monthBegin(latestDate.addDays(1 - latestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) @@ -3258,3 +3261,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3294,3 +3297,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int earliestYear = earliestDate.year(); @@ -3303,3 +3306,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3331,3 +3334,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3366,3 +3369,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int latestYear = latestDate.year(); @@ -3375,3 +3378,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index b13d14f..5b5aab1 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -26,3 +26,5 @@ #include <qbitarray.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -250,5 +252,5 @@ class Recurrence /** Returns list of day positions in months. */ - const QPtrList<rMonthPos> &monthPositions() const; + const Q3PtrList<rMonthPos> &monthPositions() const; /** Returns list of day numbers of a month. */ - const QPtrList<int> &monthDays() const; + const Q3PtrList<int> &monthDays() const; @@ -281,5 +283,5 @@ class Recurrence /** Returns positions of days or months in year. */ - const QPtrList<int> &yearNums() const; + const Q3PtrList<int> &yearNums() const; /** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */ - const QPtrList<rMonthPos> &yearMonthPositions() const; + const Q3PtrList<rMonthPos> &yearMonthPositions() const; /** Returns how yearly recurrences of February 29th are handled. */ @@ -296,4 +298,4 @@ class Recurrence QString recurrenceText() const; - bool getYearlyMonthMonths(int day, QValueList<int>&, - QValueList<int> &leaplist) const; + bool getYearlyMonthMonths(int day, Q3ValueList<int>&, + Q3ValueList<int> &leaplist) const; @@ -347,5 +349,5 @@ class Recurrence int countMonthlyPosDays() const; - void getMonthlyPosDays(QValueList<int>&, int daysInMonth, + void getMonthlyPosDays(Q3ValueList<int>&, int daysInMonth, int startDayOfWeek) const; - bool getMonthlyDayDays(QValueList<int>&, int daysInMonth) const; + bool getMonthlyDayDays(Q3ValueList<int>&, int daysInMonth) const; @@ -368,9 +370,9 @@ class Recurrence - QPtrList<rMonthPos> rMonthPositions; // list of positions during a month + Q3PtrList<rMonthPos> rMonthPositions; // list of positions during a month // on which an event recurs - QPtrList<int> rMonthDays; // list of days during a month on + Q3PtrList<int> rMonthDays; // list of days during a month on // which the event recurs - QPtrList<int> rYearNums; // either months/days to recur on for rYearly, + Q3PtrList<int> rYearNums; // either months/days to recur on for rYearly, // sorted in numerical order diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp index 253d8b7..234cfcf 100644 --- a/libkcal/scheduler.cpp +++ b/libkcal/scheduler.cpp @@ -22,3 +22,5 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -266,4 +268,4 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status sta kdDebug(5800) << "Scheduler::acceptTransaction match found!" << endl; - QPtrList<Attendee> attendeesIn = incidence->attendees(); - QPtrList<Attendee> attendeesEv; + Q3PtrList<Attendee> attendeesIn = incidence->attendees(); + Q3PtrList<Attendee> attendeesEv; if (ev) attendeesEv = ev->attendees(); @@ -344,3 +346,3 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl; @@ -348,3 +350,3 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) } - QTextStream t(&f); + Q3TextStream t(&f); t << messageText; diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h index a9f43b9..357e98e 100644 --- a/libkcal/scheduler.h +++ b/libkcal/scheduler.h @@ -25,3 +25,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -97,3 +97,3 @@ class Scheduler { /** Retrieve incoming iTIP transactions */ - virtual QPtrList<ScheduleMessage> retrieveTransactions() = 0; + virtual Q3PtrList<ScheduleMessage> retrieveTransactions() = 0; diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index 9b757f7..b8c2aa7 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -24,3 +24,3 @@ #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,3 +29,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -368,3 +368,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -372,3 +372,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -390,3 +390,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) file.setName( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -477,3 +477,3 @@ bool SharpFormat::save( Calendar *calendar) QString command; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -505,6 +505,6 @@ bool SharpFormat::save( Calendar *calendar) 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") ); @@ -519,3 +519,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -523,3 +523,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -546,3 +546,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -550,3 +550,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -564,3 +564,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -568,3 +568,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -582,3 +582,3 @@ bool SharpFormat::save( Calendar *calendar) qApp->processEvents(); - QPtrList<Todo> tl = calendar->rawTodos(); + Q3PtrList<Todo> tl = calendar->rawTodos(); Todo* to = tl.first(); @@ -607,6 +607,6 @@ bool SharpFormat::save( Calendar *calendar) 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") ); @@ -617,6 +617,6 @@ bool SharpFormat::save( Calendar *calendar) 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") ); @@ -644,3 +644,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -648,3 +648,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -662,3 +662,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -666,3 +666,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -785,3 +785,3 @@ QString SharpFormat::getEventString( Event* event ) int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -625,3 +625,3 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { diff --git a/libkcal/todo.h b/libkcal/todo.h index 2131732..cea976c 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -28,2 +28,4 @@ #include <qtimer.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,3 +44,3 @@ namespace KCal { typedef ListBase<Todo> List; - QCString type() const { return "Todo"; } + Q3CString type() const { return "Todo"; } IncTypeID typeID() const { return todoID; } diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp index f01f332..324981e 100644 --- a/libkcal/vcaldrag.cpp +++ b/libkcal/vcaldrag.cpp @@ -28,3 +28,3 @@ using namespace KCal; VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/x-vCalendar", parent, name ) + : Q3StoredDrag( "text/x-vCalendar", parent, name ) { diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h index 3048124..68a320d 100644 --- a/libkcal/vcaldrag.h +++ b/libkcal/vcaldrag.h @@ -24,3 +24,3 @@ -#include <qdragobject.h> +#include <q3dragobject.h> @@ -32,3 +32,3 @@ class Calendar; /** vCalendar drag&drop class. */ -class VCalDrag : public QStoredDrag { +class VCalDrag : public Q3StoredDrag { public: diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 2e19740..9cbaf16 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,2 +29,4 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> @@ -110,4 +112,4 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) // TODO STUFF - QPtrList<Todo> todoList = mCalendar->rawTodos(); - QPtrListIterator<Todo> qlt(todoList); + Q3PtrList<Todo> todoList = mCalendar->rawTodos(); + Q3PtrListIterator<Todo> qlt(todoList); for (; qlt.current(); ++qlt) { @@ -118,3 +120,3 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) // EVENT STUFF - QPtrList<Event> events = mCalendar->rawEvents(); + Q3PtrList<Event> events = mCalendar->rawEvents(); Event *ev; @@ -140,3 +142,3 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) - QCString data = text.utf8(); + Q3CString data = text.utf8(); @@ -212,3 +214,3 @@ QString VCalFormat::toString( Calendar *calendar ) // TODO: Use all data. - QPtrList<Event> events = calendar->events(); + Q3PtrList<Event> events = calendar->events(); Event *event = events.first(); @@ -273,4 +275,4 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) if (anEvent->attendeeCount() != 0) { - QPtrList<Attendee> al = anEvent->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = anEvent->attendees(); + Q3PtrListIterator<Attendee> ai(al); Attendee *curAttendee; @@ -328,3 +330,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vtodo, VCRelatedToProp, @@ -357,3 +359,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl; - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; @@ -435,4 +437,4 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) if (anEvent->attendeeCount() != 0) { - QPtrList<Attendee> al = anEvent->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = anEvent->attendees(); + Q3PtrListIterator<Attendee> ai(al); Attendee *curAttendee; @@ -463,4 +465,4 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // some more variables - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; @@ -547,3 +549,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) } else { - tmpStr += qDateTimeToISO(anEvent->recurrence()->endDate(), FALSE); + tmpStr += qDateTimeToISO((QDateTime)anEvent->recurrence()->endDate(), FALSE); } @@ -627,3 +629,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // TODO: handle binary attachments! - QPtrList<Attachment> attachments = anEvent->attachments(); + Q3PtrList<Attachment> attachments = anEvent->attachments(); for ( Attachment *at = attachments.first(); at; at = attachments.next() ) @@ -638,3 +640,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // alarm stuff - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; @@ -674,3 +676,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vevent, VCRelatedToProp, @@ -1410,3 +1412,3 @@ QString VCalFormat::qDateToISO(const QDate &qd) - ASSERT(qd.isValid()); + Q_ASSERT(qd.isValid()); @@ -1422,4 +1424,4 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu) - ASSERT(qdt.date().isValid()); - ASSERT(qdt.time().isValid()); + Q_ASSERT(qdt.date().isValid()); + Q_ASSERT(qdt.time().isValid()); if (zulu && !useLocalTime ) { @@ -1456,4 +1458,4 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr) - ASSERT(tmpDate.isValid()); - ASSERT(tmpTime.isValid()); + Q_ASSERT(tmpDate.isValid()); + Q_ASSERT(tmpTime.isValid()); QDateTime tmpDT(tmpDate, tmpTime); @@ -1650,3 +1652,3 @@ Attendee::Role VCalFormat::readRole(const char *s) const -QCString VCalFormat::writeRole(Attendee::Role role) const +Q3CString VCalFormat::writeRole(Attendee::Role role) const { @@ -1688,3 +1690,3 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const -QCString VCalFormat::writeStatus(Attendee::PartStat status) const +Q3CString VCalFormat::writeStatus(Attendee::PartStat status) const { diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h index 6dae3d2..cac9634 100644 --- a/libkcal/vcalformat.h +++ b/libkcal/vcalformat.h @@ -25,2 +25,5 @@ #include "calformat.h" +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> @@ -97,6 +100,6 @@ class VCalFormat : public CalFormat { 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; @@ -106,4 +109,4 @@ class VCalFormat : public CalFormat { - QPtrList<Event> mEventsRelate; // events with relations - QPtrList<Todo> mTodosRelate; // todos with relations + Q3PtrList<Event> mEventsRelate; // events with relations + Q3PtrList<Todo> mTodosRelate; // todos with relations }; |