summaryrefslogtreecommitdiffstats
path: root/libkcal/icalformatimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcal/icalformatimpl.cpp')
-rw-r--r--libkcal/icalformatimpl.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 50879378e..bb53a3531 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -83,8 +83,8 @@ const int gSecondsPerHour = gSecondsPerMinute * 60;
const int gSecondsPerDay = gSecondsPerHour * 24;
const int gSecondsPerWeek = gSecondsPerDay * 7;
-ICalFormatImpl::ICalFormatImpl( ICalFormat *tqparent ) :
- mParent( tqparent ), mCompat( new Compat )
+ICalFormatImpl::ICalFormatImpl( ICalFormat *parent ) :
+ mParent( parent ), mCompat( new Compat )
{
}
@@ -305,7 +305,7 @@ icalcomponent *ICalFormatImpl::writeJournal(Journal *journal)
return vjournal;
}
-void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence)
+void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
{
// pilot sync stuff
// TODO: move this application-specific code to kpilot
@@ -318,17 +318,17 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
icalproperty *p = 0;
p = icalproperty_new_x(TQString::number(incidence->synctqStatus()).utf8());
icalproperty_set_x_name(p,"X-PILOTSTAT");
- icalcomponent_add_property(tqparent,p);
+ icalcomponent_add_property(parent,p);
p = icalproperty_new_x(TQString::number(incidence->pilotId()).utf8());
icalproperty_set_x_name(p,"X-PILOTID");
- icalcomponent_add_property(tqparent,p);
+ icalcomponent_add_property(parent,p);
}
TQString modifiedUid;
if ( incidence->hasRecurrenceID() ) {
- // Recurring incidences are special; they must match their tqparent's UID
- // Each child has the tqparent set as the first item in the list
+ // Recurring incidences are special; they must match their parent's UID
+ // Each child has the parent set as the first item in the list
// So, get and set the UID...
IncidenceList il = incidence->childIncidences();
IncidenceListIterator it;
@@ -346,53 +346,53 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
else
incidence->removeCustomProperty( "LIBKCAL", "ID" );
- writeIncidenceBase(tqparent,incidence);
+ writeIncidenceBase(parent,incidence);
// creation date
- icalcomponent_add_property(tqparent,icalproperty_new_created(
+ icalcomponent_add_property(parent,icalproperty_new_created(
writeICalDateTime(incidence->created())));
// unique id
// If the scheduling ID is different from the real UID, the real
// one is stored on X-REALID above
if ( incidence->hasRecurrenceID() ) {
- // Recurring incidences are special; they must match their tqparent's UID
- icalcomponent_add_property(tqparent,icalproperty_new_uid(modifiedUid.utf8()));
+ // Recurring incidences are special; they must match their parent's UID
+ icalcomponent_add_property(parent,icalproperty_new_uid(modifiedUid.utf8()));
}
else {
if ( !incidence->schedulingID().isEmpty() ) {
- icalcomponent_add_property(tqparent,icalproperty_new_uid(
+ icalcomponent_add_property(parent,icalproperty_new_uid(
incidence->schedulingID().utf8()));
}
}
// revision
if ( incidence->revision() > 0 ) { // 0 is default, so don't write that out
- icalcomponent_add_property(tqparent,icalproperty_new_sequence(
+ icalcomponent_add_property(parent,icalproperty_new_sequence(
incidence->revision()));
}
// last modification date
if ( incidence->lastModified().isValid() ) {
- icalcomponent_add_property(tqparent,icalproperty_new_lastmodified(
+ icalcomponent_add_property(parent,icalproperty_new_lastmodified(
writeICalDateTime(incidence->lastModified())));
}
// description
if (!incidence->description().isEmpty()) {
- icalcomponent_add_property(tqparent,icalproperty_new_description(
+ icalcomponent_add_property(parent,icalproperty_new_description(
incidence->description().utf8()));
}
// summary
if (!incidence->summary().isEmpty()) {
- icalcomponent_add_property(tqparent,icalproperty_new_summary(
+ icalcomponent_add_property(parent,icalproperty_new_summary(
incidence->summary().utf8()));
}
// location
if (!incidence->location().isEmpty()) {
- icalcomponent_add_property(tqparent,icalproperty_new_location(
+ icalcomponent_add_property(parent,icalproperty_new_location(
incidence->location().utf8()));
}
@@ -410,7 +410,7 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
case Incidence::StatusX: {
icalproperty* p = icalproperty_new_status(ICAL_STATUS_X);
icalvalue_set_x(icalproperty_get_value(p), incidence->statusStr().utf8());
- icalcomponent_add_property(tqparent, p);
+ icalcomponent_add_property(parent, p);
break;
}
case Incidence::StatusNone:
@@ -418,7 +418,7 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
break;
}
if (status != ICAL_STATUS_NONE)
- icalcomponent_add_property(tqparent, icalproperty_new_status(status));
+ icalcomponent_add_property(parent, icalproperty_new_status(status));
// secrecy
icalproperty_class secClass;
@@ -435,12 +435,12 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
break;
}
if ( secClass != ICAL_CLASS_PUBLIC ) {
- icalcomponent_add_property(tqparent,icalproperty_new_class(secClass));
+ icalcomponent_add_property(parent,icalproperty_new_class(secClass));
}
// priority
if ( incidence->priority() > 0 ) { // 0 is undefined priority
- icalcomponent_add_property(tqparent,icalproperty_new_priority(
+ icalcomponent_add_property(parent,icalproperty_new_priority(
incidence->priority()));
}
@@ -448,18 +448,18 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
TQStringList categories = incidence->categories();
TQStringList::Iterator it;
for(it = categories.begin(); it != categories.end(); ++it ) {
- icalcomponent_add_property(tqparent,icalproperty_new_categories((*it).utf8()));
+ icalcomponent_add_property(parent,icalproperty_new_categories((*it).utf8()));
}
// related event
if ( !incidence->relatedToUid().isEmpty() ) {
- icalcomponent_add_property(tqparent,icalproperty_new_relatedto(
+ icalcomponent_add_property(parent,icalproperty_new_relatedto(
incidence->relatedToUid().utf8()));
}
// recurrenceid
if ( incidence->hasRecurrenceID() ) {
- icalcomponent_add_property(tqparent, icalproperty_new_recurrenceid( writeICalDateTime( incidence->recurrenceID() ) ));
+ icalcomponent_add_property(parent, icalproperty_new_recurrenceid( writeICalDateTime( incidence->recurrenceID() ) ));
}
// kdDebug(5800) << "Write recurrence for '" << incidence->summary() << "' (" << incidence->uid()
@@ -468,27 +468,27 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
RecurrenceRule::List rrules( incidence->recurrence()->rRules() );
RecurrenceRule::List::ConstIterator rit;
for ( rit = rrules.begin(); rit != rrules.end(); ++rit ) {
- icalcomponent_add_property( tqparent, icalproperty_new_rrule(
+ icalcomponent_add_property( parent, icalproperty_new_rrule(
writeRecurrenceRule( (*rit) ) ) );
}
RecurrenceRule::List exrules( incidence->recurrence()->exRules() );
RecurrenceRule::List::ConstIterator exit;
for ( exit = exrules.begin(); exit != exrules.end(); ++exit ) {
- icalcomponent_add_property( tqparent, icalproperty_new_rrule(
+ icalcomponent_add_property( parent, icalproperty_new_rrule(
writeRecurrenceRule( (*exit) ) ) );
}
DateList dateList = incidence->recurrence()->exDates();
DateList::ConstIterator exIt;
for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) {
- icalcomponent_add_property(tqparent,icalproperty_new_exdate(
+ icalcomponent_add_property(parent,icalproperty_new_exdate(
writeICalDate(*exIt)));
}
DateTimeList dateTimeList = incidence->recurrence()->exDateTimes();
DateTimeList::ConstIterator extIt;
for(extIt = dateTimeList.begin(); extIt != dateTimeList.end(); ++extIt) {
- icalcomponent_add_property(tqparent,icalproperty_new_exdate(
+ icalcomponent_add_property(parent,icalproperty_new_exdate(
writeICalDateTime(*extIt)));
}
@@ -496,13 +496,13 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
dateList = incidence->recurrence()->rDates();
DateList::ConstIterator rdIt;
for( rdIt = dateList.begin(); rdIt != dateList.end(); ++rdIt) {
- icalcomponent_add_property( tqparent, icalproperty_new_rdate(
+ icalcomponent_add_property( parent, icalproperty_new_rdate(
writeICalDatePeriod(*rdIt) ) );
}
dateTimeList = incidence->recurrence()->rDateTimes();
DateTimeList::ConstIterator rdtIt;
for( rdtIt = dateTimeList.begin(); rdtIt != dateTimeList.end(); ++rdtIt) {
- icalcomponent_add_property( tqparent, icalproperty_new_rdate(
+ icalcomponent_add_property( parent, icalproperty_new_rdate(
writeICalDateTimePeriod(*rdtIt) ) );
}
@@ -510,7 +510,7 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
Attachment::List attachments = incidence->attachments();
Attachment::List::ConstIterator atIt;
for ( atIt = attachments.begin(); atIt != attachments.end(); ++atIt ) {
- icalcomponent_add_property( tqparent, writeAttachment( *atIt ) );
+ icalcomponent_add_property( parent, writeAttachment( *atIt ) );
}
// alarms
@@ -519,7 +519,7 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
alarmIt != incidence->alarms().end(); ++alarmIt ) {
if ( (*alarmIt)->enabled() ) {
// kdDebug(5800) << "Write alarm for " << incidence->summary() << endl;
- icalcomponent_add_component( tqparent, writeAlarm( *alarmIt ) );
+ icalcomponent_add_component( parent, writeAlarm( *alarmIt ) );
}
}
@@ -527,19 +527,19 @@ void ICalFormatImpl::writeIncidence(icalcomponent *tqparent,Incidence *incidence
if (incidence->hasDuration()) {
icaldurationtype duration;
duration = writeICalDuration( incidence->duration() );
- icalcomponent_add_property(tqparent,icalproperty_new_duration(duration));
+ icalcomponent_add_property(parent,icalproperty_new_duration(duration));
}
}
-void ICalFormatImpl::writeIncidenceBase( icalcomponent *tqparent,
+void ICalFormatImpl::writeIncidenceBase( icalcomponent *parent,
IncidenceBase * incidenceBase )
{
- icalcomponent_add_property( tqparent, icalproperty_new_dtstamp(
+ icalcomponent_add_property( parent, icalproperty_new_dtstamp(
writeICalDateTime( TQDateTime::tqcurrentDateTime() ) ) );
// organizer stuff
if ( !incidenceBase->organizer().isEmpty() ) {
- icalcomponent_add_property( tqparent, writeOrganizer( incidenceBase->organizer() ) );
+ icalcomponent_add_property( parent, writeOrganizer( incidenceBase->organizer() ) );
}
// attendees
@@ -547,27 +547,27 @@ void ICalFormatImpl::writeIncidenceBase( icalcomponent *tqparent,
Attendee::List::ConstIterator it;
for( it = incidenceBase->attendees().begin();
it != incidenceBase->attendees().end(); ++it ) {
- icalcomponent_add_property( tqparent, writeAttendee( *it ) );
+ icalcomponent_add_property( parent, writeAttendee( *it ) );
}
}
// comments
TQStringList comments = incidenceBase->comments();
for (TQStringList::Iterator it=comments.begin(); it!=comments.end(); ++it) {
- icalcomponent_add_property(tqparent, icalproperty_new_comment((*it).utf8()));
+ icalcomponent_add_property(parent, icalproperty_new_comment((*it).utf8()));
}
// custom properties
- writeCustomProperties( tqparent, incidenceBase );
+ writeCustomProperties( parent, incidenceBase );
}
-void ICalFormatImpl::writeCustomProperties(icalcomponent *tqparent,CustomProperties *properties)
+void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
TQMap<TQCString, TQString> custom = properties->customProperties();
for (TQMap<TQCString, TQString>::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(tqparent,p);
+ icalcomponent_add_property(parent,p);
}
}
@@ -970,7 +970,7 @@ Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
todo->setPercentComplete(icalproperty_get_percentcomplete(p));
break;
- case ICAL_RELATEDTO_PROPERTY: // related todo (tqparent)
+ case ICAL_RELATEDTO_PROPERTY: // related todo (parent)
todo->setRelatedToUid(TQString::fromUtf8(icalproperty_get_relatedto(p)));
mTodosRelate.append(todo);
break;
@@ -1050,7 +1050,7 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
dtEndProcessed = true;
break;
- case ICAL_RELATEDTO_PROPERTY: // related event (tqparent)
+ case ICAL_RELATEDTO_PROPERTY: // related event (parent)
event->setRelatedToUid( TQString::fromUtf8( icalproperty_get_relatedto( p ) ) );
mEventsRelate.append( event );
break;
@@ -1356,11 +1356,11 @@ Attachment *ICalFormatImpl::readAttachment(icalproperty *attach)
return attachment;
}
-void ICalFormatImpl::readIncidence(icalcomponent *tqparent, icaltimezone *tz, Incidence *incidence)
+void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Incidence *incidence)
{
- readIncidenceBase(tqparent,incidence);
+ readIncidenceBase(parent,incidence);
- icalproperty *p = icalcomponent_get_first_property(tqparent,ICAL_ANY_PROPERTY);
+ icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY);
const char *text;
int intvalue, inttext;
@@ -1516,7 +1516,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *tqparent, icaltimezone *tz, In
break;
}
- p = icalcomponent_get_next_property(tqparent,ICAL_ANY_PROPERTY);
+ p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY);
}
// Set the scheduling ID
@@ -1538,9 +1538,9 @@ void ICalFormatImpl::readIncidence(icalcomponent *tqparent, icaltimezone *tz, In
incidence->setCategories(categories);
// iterate through all alarms
- for (icalcomponent *alarm = icalcomponent_get_first_component(tqparent,ICAL_VALARM_COMPONENT);
+ for (icalcomponent *alarm = icalcomponent_get_first_component(parent,ICAL_VALARM_COMPONENT);
alarm;
- alarm = icalcomponent_get_next_component(tqparent,ICAL_VALARM_COMPONENT)) {
+ alarm = icalcomponent_get_next_component(parent,ICAL_VALARM_COMPONENT)) {
readAlarm(alarm,incidence);
}
// Fix incorrect alarm settings by other applications (like outloook 9)
@@ -1548,9 +1548,9 @@ void ICalFormatImpl::readIncidence(icalcomponent *tqparent, icaltimezone *tz, In
}
-void ICalFormatImpl::readIncidenceBase(icalcomponent *tqparent,IncidenceBase *incidenceBase)
+void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *incidenceBase)
{
- icalproperty *p = icalcomponent_get_first_property(tqparent,ICAL_ANY_PROPERTY);
+ icalproperty *p = icalcomponent_get_first_property(parent,ICAL_ANY_PROPERTY);
bool uidProcessed = false;
@@ -1580,7 +1580,7 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *tqparent,IncidenceBase *in
break;
}
- p = icalcomponent_get_next_property( tqparent, ICAL_ANY_PROPERTY );
+ p = icalcomponent_get_next_property( parent, ICAL_ANY_PROPERTY );
}
if ( !uidProcessed ) {
@@ -1604,35 +1604,35 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *tqparent,IncidenceBase *in
// (documented in UsingLibical.txt)
icalproperty *next =0;
- for ( p = icalcomponent_get_first_property(tqparent,ICAL_X_PROPERTY);
+ for ( p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
p != 0;
p = next )
{
- next = icalcomponent_get_next_property(tqparent,ICAL_X_PROPERTY);
+ next = icalcomponent_get_next_property(parent,ICAL_X_PROPERTY);
TQString value = TQString::fromUtf8(icalproperty_get_x(p));
TQString name = icalproperty_get_x_name(p);
if (name == "X-PILOTID" && !value.isEmpty()) {
incidenceBase->setPilotId(value.toInt());
- icalcomponent_remove_property(tqparent,p);
+ icalcomponent_remove_property(parent,p);
} else if (name == "X-PILOTSTAT" && !value.isEmpty()) {
incidenceBase->setSynctqStatus(value.toInt());
- icalcomponent_remove_property(tqparent,p);
+ icalcomponent_remove_property(parent,p);
}
}
// custom properties
- readCustomProperties(tqparent, incidenceBase);
+ readCustomProperties(parent, incidenceBase);
}
-void ICalFormatImpl::readCustomProperties(icalcomponent *tqparent,CustomProperties *properties)
+void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
TQMap<TQCString, TQString> customProperties;
TQString lastProperty;
- icalproperty *p = icalcomponent_get_first_property(tqparent,ICAL_X_PROPERTY);
+ icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
while (p) {
@@ -1644,7 +1644,7 @@ void ICalFormatImpl::readCustomProperties(icalcomponent *tqparent,CustomProperti
customProperties[name] = customProperties[name].append( "," ).append( value );
}
// kdDebug(5800) << "Set custom property [" << name << '=' << value << ']' << endl;
- p = icalcomponent_get_next_property(tqparent,ICAL_X_PROPERTY);
+ p = icalcomponent_get_next_property(parent,ICAL_X_PROPERTY);
lastProperty = name;
}
@@ -2177,9 +2177,9 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar )
printf("FIXME! [WARNING] Parent for child event does not yet exist!\n\r");
}
else {
- // Add this todo to its tqparent
+ // Add this todo to its parent
cal->todo(originalUid)->addChildIncidence(todo->uid());
- // And the tqparent to the child
+ // And the parent to the child
todo->addChildIncidence(cal->todo(originalUid)->uid());
}
}
@@ -2215,9 +2215,9 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar )
printf("FIXME! [WARNING] Parent for child event does not yet exist!\n\r");
}
else {
- // Add this event to its tqparent
+ // Add this event to its parent
cal->event(originalUid)->addChildIncidence(event->uid());
- // And the tqparent to the child
+ // And the parent to the child
event->addChildIncidence(cal->event(originalUid)->uid());
}
}
@@ -2253,9 +2253,9 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar )
printf("FIXME! [WARNING] Parent for child event does not yet exist!\n\r");
}
else {
- // Add this journal to its tqparent
+ // Add this journal to its parent
cal->journal(originalUid)->addChildIncidence(journal->uid());
- // And the tqparent to the child
+ // And the parent to the child
journal->addChildIncidence(cal->journal(originalUid)->uid());
}
}