summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
authorzautrix <zautrix>2004-08-20 04:28:28 (UTC)
committer zautrix <zautrix>2004-08-20 04:28:28 (UTC)
commit93decd4185adc7197008e8397cf753a5ab674d99 (patch) (side-by-side diff)
tree0d701d0a687c22cfe2894121f8540d60a5fbe7a9 /libkcal/vcalformat.cpp
parentf7a401f03c18ef96eb40dc5540b31cd10880e845 (diff)
downloadkdepimpi-93decd4185adc7197008e8397cf753a5ab674d99.zip
kdepimpi-93decd4185adc7197008e8397cf753a5ab674d99.tar.gz
kdepimpi-93decd4185adc7197008e8397cf753a5ab674d99.tar.bz2
Bugfixes for syncing
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 076cd3f..9307f12 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -347,11 +347,8 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
Alarm* alarm;
for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
if (alarm->enabled()) {
- VObject *a = addProp(vtodo, VCDAlarmProp);
+ VObject *a;
tmpStr = qDateTimeToISO(alarm->time());
- addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
- addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCDisplayStringProp, "beep!");
if (alarm->type() == Alarm::Audio) {
a = addProp(vtodo, VCAAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
@@ -363,6 +360,11 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile()));
+ } else {
+ a = addProp(vtodo, VCDAlarmProp);
+ addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
+ addPropValue(a, VCRepeatCountProp, "1");
+ addPropValue(a, VCDisplayStringProp, "beep!");
}
}
}
@@ -626,11 +628,8 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
Alarm* alarm;
for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
if (alarm->enabled()) {
- VObject *a = addProp(vevent, VCDAlarmProp);
+ VObject *a ;
tmpStr = qDateTimeToISO(alarm->time());
- addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
- addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCDisplayStringProp, "beep!");
if (alarm->type() == Alarm::Audio) {
a = addProp(vevent, VCAAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
@@ -642,6 +641,12 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile()));
+ } else {
+ a = addProp(vevent, VCDAlarmProp);
+ addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
+ addPropValue(a, VCRepeatCountProp, "1");
+ addPropValue(a, VCDisplayStringProp, "beep!");
+
}
}
}