summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index a6ae1bc..df93209 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -63,4 +63,5 @@ bool VCalFormat::load(Calendar *calendar, const QString &fileName)
mCalendar = calendar;
clearException();
+ if ( ! useLocalTime )
useLocalTime = mCalendar->isLocalTime();
VObject *vcal = 0;
@@ -91,4 +92,5 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName)
{
mCalendar = calendar;
+ if ( ! useLocalTime )
useLocalTime = mCalendar->isLocalTime();
@@ -1173,4 +1175,6 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
/*********************** YEARLY-BY-MONTH *******************************/
else if (tmpStr.left(2) == "YM") {
+ // we have to set this such that recurrence accepts addYearlyNum(tmpDay);
+ anEvent->recurrence()->setYearly(Recurrence::rYearlyMonth, 1, -1);
int index = tmpStr.find(' ');
int last = tmpStr.findRev(' ') + 1;
@@ -1207,4 +1211,6 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
/*********************** YEARLY-BY-DAY *********************************/
else if (tmpStr.left(2) == "YD") {
+ // we have to set this such that recurrence accepts addYearlyNum(tmpDay);
+ anEvent->recurrence()->setYearly(Recurrence::rYearlyDay, 1, -1);
int index = tmpStr.find(' ');
int last = tmpStr.findRev(' ') + 1;
@@ -1537,9 +1543,10 @@ void VCalFormat::populate(VObject *vcal)
// set the time zone
if ((curVO = isAPropertyOf(vcal, VCTimeZoneProp)) != 0) {
+ if ( vObjectUStringZValue(curVO) != 0 ) {
char *s = fakeCString(vObjectUStringZValue(curVO));
mCalendar->setTimeZone(s);
deleteStr(s);
}
-
+ }
// Store all events with a relatedTo property in a list for post-processing