-rw-r--r-- | libkcal/icalformatimpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index bb9cb29..2e38ae3 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp | |||
@@ -1149,129 +1149,129 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) | |||
1149 | icaldurationtype icalduration; | 1149 | icaldurationtype icalduration; |
1150 | struct icalrecurrencetype rectype; | 1150 | struct icalrecurrencetype rectype; |
1151 | QStringList categories; | 1151 | QStringList categories; |
1152 | 1152 | ||
1153 | while (p) { | 1153 | while (p) { |
1154 | icalproperty_kind kind = icalproperty_isa(p); | 1154 | icalproperty_kind kind = icalproperty_isa(p); |
1155 | switch (kind) { | 1155 | switch (kind) { |
1156 | 1156 | ||
1157 | case ICAL_CREATED_PROPERTY: | 1157 | case ICAL_CREATED_PROPERTY: |
1158 | icaltime = icalproperty_get_created(p); | 1158 | icaltime = icalproperty_get_created(p); |
1159 | incidence->setCreated(readICalDateTime(icaltime)); | 1159 | incidence->setCreated(readICalDateTime(icaltime)); |
1160 | break; | 1160 | break; |
1161 | 1161 | ||
1162 | case ICAL_SEQUENCE_PROPERTY: // sequence | 1162 | case ICAL_SEQUENCE_PROPERTY: // sequence |
1163 | intvalue = icalproperty_get_sequence(p); | 1163 | intvalue = icalproperty_get_sequence(p); |
1164 | incidence->setRevision(intvalue); | 1164 | incidence->setRevision(intvalue); |
1165 | break; | 1165 | break; |
1166 | 1166 | ||
1167 | case ICAL_LASTMODIFIED_PROPERTY: // last modification date | 1167 | case ICAL_LASTMODIFIED_PROPERTY: // last modification date |
1168 | icaltime = icalproperty_get_lastmodified(p); | 1168 | icaltime = icalproperty_get_lastmodified(p); |
1169 | incidence->setLastModified(readICalDateTime(icaltime)); | 1169 | incidence->setLastModified(readICalDateTime(icaltime)); |
1170 | break; | 1170 | break; |
1171 | 1171 | ||
1172 | case ICAL_DTSTART_PROPERTY: // start date and time | 1172 | case ICAL_DTSTART_PROPERTY: // start date and time |
1173 | icaltime = icalproperty_get_dtstart(p); | 1173 | icaltime = icalproperty_get_dtstart(p); |
1174 | if (icaltime.is_date) { | 1174 | if (icaltime.is_date) { |
1175 | incidence->setDtStart(QDateTime(readICalDate(icaltime),QTime(0,0,0))); | 1175 | incidence->setDtStart(QDateTime(readICalDate(icaltime),QTime(0,0,0))); |
1176 | incidence->setFloats(true); | 1176 | incidence->setFloats(true); |
1177 | } else { | 1177 | } else { |
1178 | incidence->setDtStart(readICalDateTime(icaltime)); | 1178 | incidence->setDtStart(readICalDateTime(icaltime)); |
1179 | } | 1179 | } |
1180 | break; | 1180 | break; |
1181 | 1181 | ||
1182 | case ICAL_DURATION_PROPERTY: // start date and time | 1182 | case ICAL_DURATION_PROPERTY: // start date and time |
1183 | icalduration = icalproperty_get_duration(p); | 1183 | icalduration = icalproperty_get_duration(p); |
1184 | incidence->setDuration(readICalDuration(icalduration)); | 1184 | incidence->setDuration(readICalDuration(icalduration)); |
1185 | break; | 1185 | break; |
1186 | 1186 | ||
1187 | case ICAL_DESCRIPTION_PROPERTY: // description | 1187 | case ICAL_DESCRIPTION_PROPERTY: // description |
1188 | text = icalproperty_get_description(p); | 1188 | text = icalproperty_get_description(p); |
1189 | incidence->setDescription(QString::fromUtf8(text)); | 1189 | incidence->setDescription(QString::fromUtf8(text)); |
1190 | break; | 1190 | break; |
1191 | 1191 | ||
1192 | case ICAL_SUMMARY_PROPERTY: // summary | 1192 | case ICAL_SUMMARY_PROPERTY: // summary |
1193 | { | 1193 | { |
1194 | text = icalproperty_get_summary(p); | 1194 | text = icalproperty_get_summary(p); |
1195 | incidence->setSummary(QString::fromUtf8(text)); | 1195 | incidence->setSummary(QString::fromUtf8(text)); |
1196 | } | 1196 | } |
1197 | break; | 1197 | break; |
1198 | case ICAL_STATUS_PROPERTY: // summary | 1198 | case ICAL_STATUS_PROPERTY: // summary |
1199 | { | 1199 | { |
1200 | if ( ICAL_STATUS_CANCELLED == icalproperty_get_status(p) ) | 1200 | if ( ICAL_STATUS_CANCELLED == icalproperty_get_status(p) ) |
1201 | incidence->setCancelled( true ); | 1201 | incidence->setCancelled( true ); |
1202 | } | 1202 | } |
1203 | break; | 1203 | break; |
1204 | 1204 | ||
1205 | case ICAL_LOCATION_PROPERTY: // location | 1205 | case ICAL_LOCATION_PROPERTY: // location |
1206 | text = icalproperty_get_location(p); | 1206 | text = icalproperty_get_location(p); |
1207 | incidence->setLocation(QString::fromUtf8(text)); | 1207 | incidence->setLocation(QString::fromUtf8(text)); |
1208 | break; | 1208 | break; |
1209 | 1209 | ||
1210 | case ICAL_RECURRENCEID_PROPERTY: | 1210 | case ICAL_RECURRENCEID_PROPERTY: |
1211 | icaltime = icalproperty_get_recurrenceid(p); | 1211 | icaltime = icalproperty_get_recurrenceid(p); |
1212 | incidence->setRecurrenceID( readICalDateTime(icaltime) ); | 1212 | incidence->setRecurrenceID( readICalDateTime(icaltime) ); |
1213 | qDebug(" RecurrenceID %s",incidence->recurrenceID().toString().latin1() ); | 1213 | //qDebug(" RecurrenceID %s",incidence->recurrenceID().toString().latin1() ); |
1214 | break; | 1214 | break; |
1215 | #if 0 | 1215 | #if 0 |
1216 | // status | 1216 | // status |
1217 | if ((vo = isAPropertyOf(vincidence, VCStatusProp)) != 0) { | 1217 | if ((vo = isAPropertyOf(vincidence, VCStatusProp)) != 0) { |
1218 | incidence->setStatus(s = fakeCString(vObjectUStringZValue(vo))); | 1218 | incidence->setStatus(s = fakeCString(vObjectUStringZValue(vo))); |
1219 | deleteStr(s); | 1219 | deleteStr(s); |
1220 | } | 1220 | } |
1221 | else | 1221 | else |
1222 | incidence->setStatus("NEEDS ACTION"); | 1222 | incidence->setStatus("NEEDS ACTION"); |
1223 | #endif | 1223 | #endif |
1224 | 1224 | ||
1225 | case ICAL_PRIORITY_PROPERTY: // priority | 1225 | case ICAL_PRIORITY_PROPERTY: // priority |
1226 | intvalue = icalproperty_get_priority(p); | 1226 | intvalue = icalproperty_get_priority(p); |
1227 | incidence->setPriority(intvalue); | 1227 | incidence->setPriority(intvalue); |
1228 | break; | 1228 | break; |
1229 | 1229 | ||
1230 | case ICAL_CATEGORIES_PROPERTY: // categories | 1230 | case ICAL_CATEGORIES_PROPERTY: // categories |
1231 | text = icalproperty_get_categories(p); | 1231 | text = icalproperty_get_categories(p); |
1232 | categories.append(QString::fromUtf8(text)); | 1232 | categories.append(QString::fromUtf8(text)); |
1233 | break; | 1233 | break; |
1234 | //******************************************* | 1234 | //******************************************* |
1235 | case ICAL_RRULE_PROPERTY: | 1235 | case ICAL_RRULE_PROPERTY: |
1236 | // we do need (maybe )start datetime of incidence for recurrence | 1236 | // we do need (maybe )start datetime of incidence for recurrence |
1237 | // such that we can read recurrence only after we read incidence completely | 1237 | // such that we can read recurrence only after we read incidence completely |
1238 | readrec = true; | 1238 | readrec = true; |
1239 | rectype = icalproperty_get_rrule(p); | 1239 | rectype = icalproperty_get_rrule(p); |
1240 | break; | 1240 | break; |
1241 | 1241 | ||
1242 | case ICAL_EXDATE_PROPERTY: | 1242 | case ICAL_EXDATE_PROPERTY: |
1243 | icaltime = icalproperty_get_exdate(p); | 1243 | icaltime = icalproperty_get_exdate(p); |
1244 | incidence->addExDate(readICalDate(icaltime)); | 1244 | incidence->addExDate(readICalDate(icaltime)); |
1245 | break; | 1245 | break; |
1246 | 1246 | ||
1247 | case ICAL_CLASS_PROPERTY: { | 1247 | case ICAL_CLASS_PROPERTY: { |
1248 | int inttext = icalproperty_get_class(p); | 1248 | int inttext = icalproperty_get_class(p); |
1249 | if (inttext == ICAL_CLASS_PUBLIC ) { | 1249 | if (inttext == ICAL_CLASS_PUBLIC ) { |
1250 | incidence->setSecrecy(Incidence::SecrecyPublic); | 1250 | incidence->setSecrecy(Incidence::SecrecyPublic); |
1251 | } else if (inttext == ICAL_CLASS_CONFIDENTIAL ) { | 1251 | } else if (inttext == ICAL_CLASS_CONFIDENTIAL ) { |
1252 | incidence->setSecrecy(Incidence::SecrecyConfidential); | 1252 | incidence->setSecrecy(Incidence::SecrecyConfidential); |
1253 | } else { | 1253 | } else { |
1254 | incidence->setSecrecy(Incidence::SecrecyPrivate); | 1254 | incidence->setSecrecy(Incidence::SecrecyPrivate); |
1255 | } | 1255 | } |
1256 | } | 1256 | } |
1257 | break; | 1257 | break; |
1258 | 1258 | ||
1259 | case ICAL_ATTACH_PROPERTY: // attachments | 1259 | case ICAL_ATTACH_PROPERTY: // attachments |
1260 | incidence->addAttachment(readAttachment(p)); | 1260 | incidence->addAttachment(readAttachment(p)); |
1261 | break; | 1261 | break; |
1262 | 1262 | ||
1263 | default: | 1263 | default: |
1264 | // kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind | 1264 | // kdDebug(5800) << "ICALFormat::readIncidence(): Unknown property: " << kind |
1265 | // << endl; | 1265 | // << endl; |
1266 | break; | 1266 | break; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY); | 1269 | p = icalcomponent_get_next_property(parent,ICAL_ANY_PROPERTY); |
1270 | } | 1270 | } |
1271 | if ( readrec ) { | 1271 | if ( readrec ) { |
1272 | readRecurrenceRule(rectype,incidence); | 1272 | readRecurrenceRule(rectype,incidence); |
1273 | } | 1273 | } |
1274 | // kpilot stuff | 1274 | // kpilot stuff |
1275 | // TODO: move this application-specific code to kpilot | 1275 | // TODO: move this application-specific code to kpilot |
1276 | QString kp = incidence->nonKDECustomProperty("X-PILOTID"); | 1276 | QString kp = incidence->nonKDECustomProperty("X-PILOTID"); |
1277 | if (!kp.isNull()) { | 1277 | if (!kp.isNull()) { |