summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformatimpl.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/icalformatimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/icalformatimpl.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 65eabc8..ea144ee 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -19,10 +19,13 @@
*/
#include <qdatetime.h>
#include <qstring.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qfile.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3CString>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
@@ -220,10 +223,10 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy,
freebusy->uid().utf8()));
}
//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;
for (it = list.begin(); it!= list.end(); ++it) {
period.start = writeICalDateTime((*it).start());
period.end = writeICalDateTime((*it).end());
@@ -383,14 +386,14 @@ 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())
icalcomponent_add_property(parent,writeAttachment(at));
// alarms
- QPtrList<Alarm> alarms = incidence->alarms();
+ Q3PtrList<Alarm> alarms = incidence->alarms();
Alarm* alarm;
for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
if (alarm->enabled()) {
kdDebug(5800) << "Write alarm for " << incidence->summary() << endl;
@@ -422,10 +425,10 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc
("MAILTO:" + incidenceBase->organizer()).utf8()));
// attendees
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) {
icalcomponent_add_property(parent,writeAttendee(ai.current()));
}
}
@@ -435,10 +438,10 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc
}
void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
- 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());
icalproperty_set_x_name(p,c.key());
icalcomponent_add_property(parent,p);
}
@@ -545,10 +548,10 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur)
int index = 0;
int index2 = 0;
- QPtrList<Recurrence::rMonthPos> tmpPositions;
- QPtrList<int> tmpDays;
+ Q3PtrList<Recurrence::rMonthPos> tmpPositions;
+ Q3PtrList<int> tmpDays;
int *tmpDay;
Recurrence::rMonthPos *tmpPos;
bool datetime = false;
int day;
@@ -703,10 +706,10 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
}
break;
case Alarm::Email: {
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());
if (!(*ad).name().isEmpty()) {
icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8()));
}
@@ -762,10 +765,10 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
icaldurationtype_from_int(alarm->snoozeTime()*60)));
}
// 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());
icalproperty_set_x_name(p,c.key());
icalcomponent_add_property(a,p);
}
@@ -1338,9 +1341,9 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
}
void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
- QMap<QCString, QString> customProperties;
+ QMap<Q3CString, QString> customProperties;
icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
while (p) {