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
@@ -17,14 +17,17 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#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>
extern "C" {
@@ -218,14 +221,14 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy,
if (method == Scheduler::Request) {
icalcomponent_add_property(vfreebusy,icalproperty_new_uid(
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());
icalcomponent_add_property(vfreebusy, icalproperty_new_freebusy(period) );
}
@@ -381,18 +384,18 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
icalcomponent_add_property(parent,icalproperty_new_exdate(
writeICalDate(*exIt)));
}
}
// 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;
icalcomponent_add_component(parent,writeAlarm(alarm));
}
@@ -420,27 +423,27 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc
// organizer stuff
icalcomponent_add_property(parent,icalproperty_new_organizer(
("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()));
}
}
// custom properties
writeCustomProperties(parent, incidenceBase);
}
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);
}
}
@@ -543,14 +546,14 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur)
icalrecurrencetype_clear(&r);
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;
int i;
@@ -701,14 +704,14 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
icalcomponent_add_property(a,icalproperty_new_attach(attach));
icalattach_unref( attach );
}
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()));
}
icalcomponent_add_property(a,p);
}
@@ -760,14 +763,14 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
icalcomponent_add_property(a,icalproperty_new_repeat(alarm->repeatCount()));
icalcomponent_add_property(a,icalproperty_new_duration(
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);
}
return a;
@@ -1336,13 +1339,13 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
// custom properties
readCustomProperties(parent, incidenceBase);
}
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) {
QString value = QString::fromUtf8(icalproperty_get_x(p));
customProperties[icalproperty_get_x_name(p)] = value;