summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Unidiff
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 59030d5..72a781a 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -343,19 +343,19 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
343 addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile())); 343 addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile()));
344 } 344 }
345 } 345 }
346 } 346 }
347 347
348 if (anEvent->pilotId()) { 348 if (anEvent->pilotId()) {
349 // pilot sync stuff 349 // pilot sync stuff
350 tmpStr.sprintf("%i",anEvent->pilotId()); 350 tmpStr.sprintf("%i",anEvent->pilotId());
351 addPropValue(vtodo, KPilotIdProp, tmpStr.local8Bit()); 351 addPropValue(vtodo, XPilotIdProp, tmpStr.local8Bit());
352 tmpStr.sprintf("%i",anEvent->syncStatus()); 352 tmpStr.sprintf("%i",anEvent->syncStatus());
353 addPropValue(vtodo, KPilotStatusProp, tmpStr.local8Bit()); 353 addPropValue(vtodo, XPilotStatusProp, tmpStr.local8Bit());
354 } 354 }
355 355
356 return vtodo; 356 return vtodo;
357} 357}
358 358
359VObject* VCalFormat::eventToVEvent(const Event *anEvent) 359VObject* VCalFormat::eventToVEvent(const Event *anEvent)
360{ 360{
361 VObject *vevent; 361 VObject *vevent;
@@ -521,17 +521,17 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
521 QString tmpStr2; 521 QString tmpStr2;
522 522
523 for (it = dateList.begin(); it != dateList.end(); ++it) { 523 for (it = dateList.begin(); it != dateList.end(); ++it) {
524 tmpStr = qDateToISO(*it) + ";"; 524 tmpStr = qDateToISO(*it) + ";";
525 tmpStr2 += tmpStr; 525 tmpStr2 += tmpStr;
526 } 526 }
527 if (!tmpStr2.isEmpty()) { 527 if (!tmpStr2.isEmpty()) {
528 tmpStr2.truncate(tmpStr2.length()-1); 528 tmpStr2.truncate(tmpStr2.length()-1);
529 addPropValue(vevent, VCExDateProp, tmpStr2.local8Bit()); 529 addPropValue(vevent, VCExpDateProp, tmpStr2.local8Bit());
530 } 530 }
531 531
532 // description 532 // description
533 if (!anEvent->description().isEmpty()) { 533 if (!anEvent->description().isEmpty()) {
534 VObject *d = addPropValue(vevent, VCDescriptionProp, 534 VObject *d = addPropValue(vevent, VCDescriptionProp,
535 anEvent->description().local8Bit()); 535 anEvent->description().local8Bit());
536 if (anEvent->description().find('\n') != -1) 536 if (anEvent->description().find('\n') != -1)
537 addProp(d, VCQuotedPrintableProp); 537 addProp(d, VCQuotedPrintableProp);
@@ -636,19 +636,19 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
636 if (anEvent->relatedTo()) { 636 if (anEvent->relatedTo()) {
637 addPropValue(vevent, VCRelatedToProp, 637 addPropValue(vevent, VCRelatedToProp,
638 anEvent->relatedTo()->uid().local8Bit()); 638 anEvent->relatedTo()->uid().local8Bit());
639 } 639 }
640 640
641 if (anEvent->pilotId()) { 641 if (anEvent->pilotId()) {
642 // pilot sync stuff 642 // pilot sync stuff
643 tmpStr.sprintf("%i",anEvent->pilotId()); 643 tmpStr.sprintf("%i",anEvent->pilotId());
644 addPropValue(vevent, KPilotIdProp, tmpStr.local8Bit()); 644 addPropValue(vevent, XPilotIdProp, tmpStr.local8Bit());
645 tmpStr.sprintf("%i",anEvent->syncStatus()); 645 tmpStr.sprintf("%i",anEvent->syncStatus());
646 addPropValue(vevent, KPilotStatusProp, tmpStr.local8Bit()); 646 addPropValue(vevent, XPilotStatusProp, tmpStr.local8Bit());
647 } 647 }
648 648
649 return vevent; 649 return vevent;
650} 650}
651 651
652Todo *VCalFormat::VTodoToEvent(VObject *vtodo) 652Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
653{ 653{
654 VObject *vo; 654 VObject *vo;
@@ -844,24 +844,24 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
844 } 844 }
845 // get last category 845 // get last category
846 category = categories.mid(index1, (categories.length()-index1)); 846 category = categories.mid(index1, (categories.length()-index1));
847 tmpStrList.append(category); 847 tmpStrList.append(category);
848 anEvent->setCategories(tmpStrList); 848 anEvent->setCategories(tmpStrList);
849 } 849 }
850 850
851 /* PILOT SYNC STUFF */ 851 /* PILOT SYNC STUFF */
852 if ((vo = isAPropertyOf(vtodo, KPilotIdProp))) { 852 if ((vo = isAPropertyOf(vtodo, XPilotIdProp))) {
853 anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo)))); 853 anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo))));
854 deleteStr(s); 854 deleteStr(s);
855 } 855 }
856 else 856 else
857 anEvent->setPilotId(0); 857 anEvent->setPilotId(0);
858 858
859 if ((vo = isAPropertyOf(vtodo, KPilotStatusProp))) { 859 if ((vo = isAPropertyOf(vtodo, XPilotStatusProp))) {
860 anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); 860 anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo))));
861 deleteStr(s); 861 deleteStr(s);
862 } 862 }
863 else 863 else
864 anEvent->setSyncStatus(Event::SYNCMOD); 864 anEvent->setSyncStatus(Event::SYNCMOD);
865 865
866 return anEvent; 866 return anEvent;
867} 867}
@@ -1202,17 +1202,17 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
1202 } 1202 }
1203 } else { 1203 } else {
1204 kdDebug(5800) << "we don't understand this type of recurrence!" << endl; 1204 kdDebug(5800) << "we don't understand this type of recurrence!" << endl;
1205 } // if 1205 } // if
1206 } // repeats 1206 } // repeats
1207 1207
1208 1208
1209 // recurrence exceptions 1209 // recurrence exceptions
1210 if ((vo = isAPropertyOf(vevent, VCExDateProp)) != 0) { 1210 if ((vo = isAPropertyOf(vevent, VCExpDateProp)) != 0) {
1211 s = fakeCString(vObjectUStringZValue(vo)); 1211 s = fakeCString(vObjectUStringZValue(vo));
1212 QStringList exDates = QStringList::split(",",s); 1212 QStringList exDates = QStringList::split(",",s);
1213 QStringList::ConstIterator it; 1213 QStringList::ConstIterator it;
1214 for(it = exDates.begin(); it != exDates.end(); ++it ) { 1214 for(it = exDates.begin(); it != exDates.end(); ++it ) {
1215 anEvent->addExDate(ISOToQDate(*it)); 1215 anEvent->addExDate(ISOToQDate(*it));
1216 } 1216 }
1217 deleteStr(s); 1217 deleteStr(s);
1218 } 1218 }
@@ -1366,24 +1366,24 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
1366 // related event 1366 // related event
1367 if ((vo = isAPropertyOf(vevent, VCRelatedToProp)) != 0) { 1367 if ((vo = isAPropertyOf(vevent, VCRelatedToProp)) != 0) {
1368 anEvent->setRelatedToUid(s = fakeCString(vObjectUStringZValue(vo))); 1368 anEvent->setRelatedToUid(s = fakeCString(vObjectUStringZValue(vo)));
1369 deleteStr(s); 1369 deleteStr(s);
1370 mEventsRelate.append(anEvent); 1370 mEventsRelate.append(anEvent);
1371 } 1371 }
1372 1372
1373 /* PILOT SYNC STUFF */ 1373 /* PILOT SYNC STUFF */
1374 if ((vo = isAPropertyOf(vevent, KPilotIdProp))) { 1374 if ((vo = isAPropertyOf(vevent, XPilotIdProp))) {
1375 anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo)))); 1375 anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo))));
1376 deleteStr(s); 1376 deleteStr(s);
1377 } 1377 }
1378 else 1378 else
1379 anEvent->setPilotId(0); 1379 anEvent->setPilotId(0);
1380 1380
1381 if ((vo = isAPropertyOf(vevent, KPilotStatusProp))) { 1381 if ((vo = isAPropertyOf(vevent, XPilotStatusProp))) {
1382 anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo)))); 1382 anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo))));
1383 deleteStr(s); 1383 deleteStr(s);
1384 } 1384 }
1385 else 1385 else
1386 anEvent->setSyncStatus(Event::SYNCMOD); 1386 anEvent->setSyncStatus(Event::SYNCMOD);
1387 1387
1388 return anEvent; 1388 return anEvent;
1389} 1389}
@@ -1517,17 +1517,17 @@ void VCalFormat::populate(VObject *vcal)
1517 while (moreIteration(&i)) { 1517 while (moreIteration(&i)) {
1518 curVO = nextVObject(&i); 1518 curVO = nextVObject(&i);
1519 1519
1520 /************************************************************************/ 1520 /************************************************************************/
1521 1521
1522 // now, check to see that the object is an event or todo. 1522 // now, check to see that the object is an event or todo.
1523 if (strcmp(vObjectName(curVO), VCEventProp) == 0) { 1523 if (strcmp(vObjectName(curVO), VCEventProp) == 0) {
1524 1524
1525 if ((curVOProp = isAPropertyOf(curVO, KPilotStatusProp)) != 0) { 1525 if ((curVOProp = isAPropertyOf(curVO, XPilotStatusProp)) != 0) {
1526 char *s; 1526 char *s;
1527 s = fakeCString(vObjectUStringZValue(curVOProp)); 1527 s = fakeCString(vObjectUStringZValue(curVOProp));
1528 // check to see if event was deleted by the kpilot conduit 1528 // check to see if event was deleted by the kpilot conduit
1529 if (atoi(s) == Event::SYNCDEL) { 1529 if (atoi(s) == Event::SYNCDEL) {
1530 deleteStr(s); 1530 deleteStr(s);
1531 kdDebug(5800) << "skipping pilot-deleted event" << endl; 1531 kdDebug(5800) << "skipping pilot-deleted event" << endl;
1532 goto SKIP; 1532 goto SKIP;
1533 } 1533 }