diff options
Diffstat (limited to 'libkcal/vcalformat.cpp')
-rw-r--r-- | libkcal/vcalformat.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 21d8ae4b5..40736a906 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -184,7 +184,7 @@ TQString VCalFormat::toString( Calendar *calendar ) Event *event = events.first(); if ( !event ) { cleanVObject( vcal ); - return TQString::null; + return TQString(); } VObject *vevent = eventToVEvent( event ); @@ -262,7 +262,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) kdDebug(5800) << "warning! this Event has an attendee w/o name or email!" << endl; VObject *aProp = addPropValue(vtodo, VCAttendeeProp, tmpStr.local8Bit()); addPropValue(aProp, VCRSVPProp, curAttendee->RSVP() ? "TRUE" : "FALSE"); - addPropValue(aProp, VCStatusProp, writeStatus(curAttendee->status())); + addPropValue(aProp, VCStatusProp, writetqStatus(curAttendee->status())); } } @@ -270,7 +270,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) if (!anEvent->description().isEmpty()) { VObject *d = addPropValue(vtodo, VCDescriptionProp, anEvent->description().local8Bit()); - if (anEvent->description().find('\n') != -1) + if (anEvent->description().tqfind('\n') != -1) addPropValue(d, VCEncodingProp, VCQuotedPrintableProp); } @@ -355,7 +355,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // pilot sync stuff tmpStr.sprintf("%lu",anEvent->pilotId()); addPropValue(vtodo, KPilotIdProp, tmpStr.local8Bit()); - tmpStr.sprintf("%i",anEvent->syncStatus()); + tmpStr.sprintf("%i",anEvent->synctqStatus()); addPropValue(vtodo, KPiloStatusProp, tmpStr.local8Bit()); } @@ -422,7 +422,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent) kdDebug(5800) << "warning! this Event has an attendee w/o name or email!" << endl; VObject *aProp = addPropValue(vevent, VCAttendeeProp, tmpStr.local8Bit()); addPropValue(aProp, VCRSVPProp, curAttendee->RSVP() ? "TRUE" : "FALSE"); - addPropValue(aProp, VCStatusProp, writeStatus(curAttendee->status())); + addPropValue(aProp, VCStatusProp, writetqStatus(curAttendee->status())); } } @@ -530,7 +530,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent) if (!anEvent->description().isEmpty()) { VObject *d = addPropValue(vevent, VCDescriptionProp, anEvent->description().local8Bit()); - if (anEvent->description().find('\n') != -1) + if (anEvent->description().tqfind('\n') != -1) addPropValue(d, VCEncodingProp, VCQuotedPrintableProp); } @@ -641,7 +641,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent) // pilot sync stuff tmpStr.sprintf("%lu",anEvent->pilotId()); addPropValue(vevent, KPilotIdProp, tmpStr.local8Bit()); - tmpStr.sprintf("%i",anEvent->syncStatus()); + tmpStr.sprintf("%i",anEvent->synctqStatus()); addPropValue(vevent, KPiloStatusProp, tmpStr.local8Bit()); } @@ -658,7 +658,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) // creation date if ((vo = isAPropertyOf(vtodo, VCDCreatedProp)) != 0) { - anEvent->setCreated(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setCreated(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } @@ -673,7 +673,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) // last modification date if ((vo = isAPropertyOf(vtodo, VCLastModifiedProp)) != 0) { - anEvent->setLastModified(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setLastModified(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } else @@ -701,13 +701,13 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) deleteStr(s); tmpStr = tmpStr.simplifyWhiteSpace(); int emailPos1, emailPos2; - if ((emailPos1 = tmpStr.find('<')) > 0) { + if ((emailPos1 = tmpStr.tqfind('<')) > 0) { // both email address and name emailPos2 = tmpStr.findRev('>'); a = new Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1))); - } else if (tmpStr.find('@') > 0) { + } else if (tmpStr.tqfind('@') > 0) { // just an email address a = new Attendee(0, tmpStr); } else { @@ -722,7 +722,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) a->setRSVP(vObjectStringZValue(vp)); // is there a status property? if ((vp = isAPropertyOf(vo, VCStatusProp)) != 0) - a->seStatus(readStatus(vObjectStringZValue(vp))); + a->setqStatus(readtqStatus(vObjectStringZValue(vp))); // add the attendee anEvent->addAttendee(a); } @@ -765,7 +765,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) // completion date if ((vo = isAPropertyOf(vtodo, VCCompletedProp)) != 0) { - anEvent->setCompleted(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setCompleted(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } @@ -777,7 +777,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) // due date if ((vo = isAPropertyOf(vtodo, VCDueProp)) != 0) { - anEvent->setDtDue(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setDtDue(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); anEvent->setHasDueDate(true); } else { @@ -786,8 +786,8 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) // start time if ((vo = isAPropertyOf(vtodo, VCDTstartProp)) != 0) { - anEvent->setDtStart(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); - // kdDebug(5800) << "s is " << // s << ", ISO is " << ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl; + anEvent->setDtStart(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + // kdDebug(5800) << "s is " << // s << ", ISO is " << ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl; deleteStr(s); anEvent->setHasStartDate(true); } else { @@ -800,7 +800,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) Alarm* alarm = anEvent->newAlarm(); VObject *a; if ((a = isAPropertyOf(vo, VCRunTimeProp))) { - alarm->setTime(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(a)))); + alarm->setTime(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(a)))); deleteStr(s); } alarm->setEnabled(true); @@ -845,11 +845,11 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) anEvent->setPilotId(0); if ((vo = isAPropertyOf(vtodo, KPiloStatusProp))) { - anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setSynctqStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } else - anEvent->setSyncStatus(Event::SYNCMOD); + anEvent->setSynctqStatus(Event::SYNCMOD); return anEvent; } @@ -864,7 +864,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // creation date if ((vo = isAPropertyOf(vevent, VCDCreatedProp)) != 0) { - anEvent->setCreated(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setCreated(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } @@ -888,7 +888,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // last modification date if ((vo = isAPropertyOf(vevent, VCLastModifiedProp)) != 0) { - anEvent->setLastModified(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setLastModified(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } else @@ -917,13 +917,13 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) deleteStr(s); tmpStr = tmpStr.simplifyWhiteSpace(); int emailPos1, emailPos2; - if ((emailPos1 = tmpStr.find('<')) > 0) { + if ((emailPos1 = tmpStr.tqfind('<')) > 0) { // both email address and name emailPos2 = tmpStr.findRev('>'); a = new Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1))); - } else if (tmpStr.find('@') > 0) { + } else if (tmpStr.tqfind('@') > 0) { // just an email address a = new Attendee(0, tmpStr); } else { @@ -937,7 +937,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) a->setRSVP(vObjectStringZValue(vp)); // is there a status property? if ((vp = isAPropertyOf(vo, VCStatusProp)) != 0) - a->seStatus(readStatus(vObjectStringZValue(vp))); + a->setqStatus(readtqStatus(vObjectStringZValue(vp))); // add the attendee anEvent->addAttendee(a); } @@ -956,8 +956,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // start time if ((vo = isAPropertyOf(vevent, VCDTstartProp)) != 0) { - anEvent->setDtStart(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); - // kdDebug(5800) << "s is " << // s << ", ISO is " << ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl; + anEvent->setDtStart(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + // kdDebug(5800) << "s is " << // s << ", ISO is " << ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl; deleteStr(s); if (anEvent->dtStart().time().isNull()) anEvent->setFloats(TRUE); @@ -965,7 +965,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // stop time if ((vo = isAPropertyOf(vevent, VCDTendProp)) != 0) { - anEvent->setDtEnd(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setDtEnd(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); if (anEvent->dtEnd().time().isNull()) anEvent->setFloats(TRUE); @@ -1012,7 +1012,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // kdDebug() << " It's a supported type " << endl; // Immediately after the type is the frequency - int index = tmpStr.find(' '); + int index = tmpStr.tqfind(' '); int last = tmpStr.findRev(' ') + 1; // find last entry int rFreq = tmpStr.mid(typelen, (index-1)).toInt(); ++index; // advance to beginning of stuff after freq @@ -1086,7 +1086,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. MD1 3 #0 while (index < last) { - int index2 = tmpStr.find(' ', index); + int index2 = tmpStr.tqfind(' ', index); short tmpDay = tmpStr.mid(index, (index2-index)).toShort(); index = index2-1; if (tmpStr.mid(index, 1) == "-") @@ -1108,7 +1108,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. YM1 3 #0 while (index < last) { - int index2 = tmpStr.find(' ', index); + int index2 = tmpStr.tqfind(' ', index); short tmpMonth = tmpStr.mid(index, (index2-index)).toShort(); index = index2 + 1; anEvent->recurrence()->addYearlyMonth( tmpMonth ); @@ -1127,7 +1127,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. YD1 123 #0 while (index < last) { - int index2 = tmpStr.find(' ', index); + int index2 = tmpStr.tqfind(' ', index); short tmpDay = tmpStr.mid(index, (index2-index)).toShort(); index = index2+1; anEvent->recurrence()->addYearlyDay( tmpDay ); @@ -1146,8 +1146,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) int rDuration = tmpStr.mid(index, tmpStr.length()-index).toInt(); if ( rDuration > 0 ) anEvent->recurrence()->setDuration( rDuration ); - } else if ( tmpStr.find('T', index) != -1 ) { - TQDate rEndDate = (ISOToQDateTime(tmpStr.mid(index, tmpStr.length()-index))).date(); + } else if ( tmpStr.tqfind('T', index) != -1 ) { + TQDate rEndDate = (ISOToTQDateTime(tmpStr.mid(index, tmpStr.length()-index))).date(); anEvent->recurrence()->setEndDateTime( rEndDate ); } // anEvent->recurrence()->dump(); @@ -1164,7 +1164,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) TQStringList exDates = TQStringList::split(",",s); TQStringList::ConstIterator it; for(it = exDates.begin(); it != exDates.end(); ++it ) { - anEvent->recurrence()->addExDate(ISOToQDate(*it)); + anEvent->recurrence()->addExDate(ISOToTQDate(*it)); } deleteStr(s); } @@ -1210,10 +1210,10 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) TQString tmpStr(s = fakeCString(vObjectUStringZValue(vo))); deleteStr(s); // TODO: Define Event status -// anEvent->seStatus(tmpStr); +// anEvent->setqStatus(tmpStr); } else -// anEvent->seStatus("NEEDS ACTION"); +// anEvent->setqStatus("NEEDS ACTION"); #endif // secrecy @@ -1262,7 +1262,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) Alarm* alarm = anEvent->newAlarm(); VObject *a; if ((a = isAPropertyOf(vo, VCRunTimeProp))) { - alarm->setTime(ISOToQDateTime(s = fakeCString(vObjectUStringZValue(a)))); + alarm->setTime(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(a)))); deleteStr(s); } alarm->setEnabled(true); @@ -1311,11 +1311,11 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) anEvent->setPilotId(0); if ((vo = isAPropertyOf(vevent, KPiloStatusProp))) { - anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); + anEvent->setSynctqStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); deleteStr(s); } else - anEvent->setSyncStatus(Event::SYNCMOD); + anEvent->setSynctqStatus(Event::SYNCMOD); return anEvent; } @@ -1372,7 +1372,7 @@ TQString VCalFormat::qDateTimeToISO(const TQDateTime &qdt, bool zulu) return tmpStr; } -TQDateTime VCalFormat::ISOToQDateTime(const TQString & dtStr) +TQDateTime VCalFormat::ISOToTQDateTime(const TQString & dtStr) { TQDate tmpDate; TQTime tmpTime; @@ -1399,7 +1399,7 @@ TQDateTime VCalFormat::ISOToQDateTime(const TQString & dtStr) return tmpDT; } -TQDate VCalFormat::ISOToQDate(const TQString &dateStr) +TQDate VCalFormat::ISOToTQDate(const TQString &dateStr) { int year, month, day; @@ -1565,7 +1565,7 @@ int VCalFormat::numFromDay(const TQString &day) return -1; // something bad happened. :) } -Attendee::PartStat VCalFormat::readStatus(const char *s) const +Attendee::PartStat VCalFormat::readtqStatus(const char *s) const { TQString statStr = s; statStr = statStr.upper(); @@ -1590,14 +1590,14 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const else if (statStr== "DELEGATED") status = Attendee::Delegated; else { - kdDebug(5800) << "error setting attendee mStatus, unknown mStatus!" << endl; + kdDebug(5800) << "error setting attendee mtqStatus, unknown mtqStatus!" << endl; status = Attendee::NeedsAction; } return status; } -TQCString VCalFormat::writeStatus(Attendee::PartStat status) const +TQCString VCalFormat::writetqStatus(Attendee::PartStat status) const { switch(status) { default: |