summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Unidiff
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 62a31ae..8efc1ea 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -321,19 +321,19 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
321 addPropValue(vtodo, VCCompletedProp, tmpStr.local8Bit()); 321 addPropValue(vtodo, VCCompletedProp, tmpStr.local8Bit());
322 } 322 }
323 323
324 // priority 324 // priority
325 tmpStr.sprintf("%i",anEvent->priority()); 325 tmpStr.sprintf("%i",anEvent->priority());
326 addPropValue(vtodo, VCPriorityProp, tmpStr.local8Bit()); 326 addPropValue(vtodo, VCPriorityProp, tmpStr.local8Bit());
327 327
328 // related event 328 // related event
329 if (anEvent->relatedTo()) { 329 if (anEvent->relatedToUid()) {
330 addPropValue(vtodo, VCRelatedToProp, 330 addPropValue(vtodo, VCRelatedToProp,
331 anEvent->relatedTo()->uid().local8Bit()); 331 anEvent->relatedToUid().local8Bit());
332 } 332 }
333 333
334 // categories 334 // categories
335 QStringList tmpStrList = anEvent->categories(); 335 QStringList tmpStrList = anEvent->categories();
336 tmpStr = ""; 336 tmpStr = "";
337 QString catStr; 337 QString catStr;
338 for ( QStringList::Iterator it = tmpStrList.begin(); 338 for ( QStringList::Iterator it = tmpStrList.begin();
339 it != tmpStrList.end(); 339 it != tmpStrList.end();
@@ -667,19 +667,19 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
667 tmpStr.sprintf("%i",anEvent->priority()); 667 tmpStr.sprintf("%i",anEvent->priority());
668 addPropValue(vevent, VCPriorityProp, tmpStr.local8Bit()); 668 addPropValue(vevent, VCPriorityProp, tmpStr.local8Bit());
669 669
670 // transparency 670 // transparency
671 tmpStr.sprintf("%i",anEvent->transparency()); 671 tmpStr.sprintf("%i",anEvent->transparency());
672 addPropValue(vevent, VCTranspProp, tmpStr.local8Bit()); 672 addPropValue(vevent, VCTranspProp, tmpStr.local8Bit());
673 673
674 // related event 674 // related event
675 if (anEvent->relatedTo()) { 675 if (anEvent->relatedToUid()) {
676 addPropValue(vevent, VCRelatedToProp, 676 addPropValue(vevent, VCRelatedToProp,
677 anEvent->relatedTo()->uid().local8Bit()); 677 anEvent->relatedToUid().local8Bit());
678 } 678 }
679 679
680 if (anEvent->pilotId()) { 680 if (anEvent->pilotId()) {
681 // pilot sync stuff 681 // pilot sync stuff
682 tmpStr.sprintf("%i",anEvent->pilotId()); 682 tmpStr.sprintf("%i",anEvent->pilotId());
683 addPropValue(vevent, XPilotIdProp, tmpStr.local8Bit()); 683 addPropValue(vevent, XPilotIdProp, tmpStr.local8Bit());
684 tmpStr.sprintf("%i",anEvent->syncStatus()); 684 tmpStr.sprintf("%i",anEvent->syncStatus());
685 addPropValue(vevent, XPilotStatusProp, tmpStr.local8Bit()); 685 addPropValue(vevent, XPilotStatusProp, tmpStr.local8Bit());
@@ -1599,21 +1599,25 @@ void VCalFormat::populate(VObject *vcal)
1599 } 1599 }
1600 SKIP: 1600 SKIP:
1601 ; 1601 ;
1602 } // while 1602 } // while
1603 1603
1604 // Post-Process list of events with relations, put Event objects in relation 1604 // Post-Process list of events with relations, put Event objects in relation
1605 Event *ev; 1605 Event *ev;
1606 for ( ev=mEventsRelate.first(); ev != 0; ev=mEventsRelate.next() ) { 1606 for ( ev=mEventsRelate.first(); ev != 0; ev=mEventsRelate.next() ) {
1607 ev->setRelatedTo(mCalendar->event(ev->relatedToUid())); 1607 Incidence * inc = mCalendar->event(ev->relatedToUid());
1608 if ( inc )
1609 ev->setRelatedTo( inc );
1608 } 1610 }
1609 Todo *todo; 1611 Todo *todo;
1610 for ( todo=mTodosRelate.first(); todo != 0; todo=mTodosRelate.next() ) { 1612 for ( todo=mTodosRelate.first(); todo != 0; todo=mTodosRelate.next() ) {
1611 todo->setRelatedTo(mCalendar->todo(todo->relatedToUid())); 1613 Incidence * inc = mCalendar->todo(todo->relatedToUid());
1614 if ( inc )
1615 todo->setRelatedTo( inc );
1612 } 1616 }
1613} 1617}
1614 1618
1615const char *VCalFormat::dayFromNum(int day) 1619const char *VCalFormat::dayFromNum(int day)
1616{ 1620{
1617 const char *days[7] = { "MO ", "TU ", "WE ", "TH ", "FR ", "SA ", "SU " }; 1621 const char *days[7] = { "MO ", "TU ", "WE ", "TH ", "FR ", "SA ", "SU " };
1618 1622
1619 return days[day]; 1623 return days[day];