summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformatimpl.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/icalformatimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/icalformatimpl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 2405682..3e28714 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -2062,111 +2062,111 @@ QString ICalFormatImpl::extractErrorProperty(icalcomponent *c)
icalproperty *error;
error = icalcomponent_get_first_property(c,ICAL_XLICERROR_PROPERTY);
while(error) {
errorMessage += icalproperty_get_xlicerror(error);
errorMessage += "\n";
error = icalcomponent_get_next_property(c,ICAL_XLICERROR_PROPERTY);
}
// kdDebug(5800) << "ICalFormatImpl:extractErrorProperty: " << errorMessage << endl;
return errorMessage;
}
void ICalFormatImpl::dumpIcalRecurrence(icalrecurrencetype r)
{
int i;
if (r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
QString out = " By Day: ";
while((i = r.by_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
out.append(QString::number(i) + " ");
}
}
if (r.by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
QString out = " By Month Day: ";
while((i = r.by_month_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
out.append(QString::number(i) + " ");
}
}
if (r.by_year_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
QString out = " By Year Day: ";
while((i = r.by_year_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
out.append(QString::number(i) + " ");
}
}
if (r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
QString out = " By Month: ";
while((i = r.by_month[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
out.append(QString::number(i) + " ");
}
}
if (r.by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
QString out = " By Set Pos: ";
while((i = r.by_set_pos[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
out.append(QString::number(i) + " ");
}
}
}
icalcomponent *ICalFormatImpl::createScheduleComponent(IncidenceBase *incidence,
Scheduler::Method method)
{
icalcomponent *message = createCalendarComponent();
icalproperty_method icalmethod = ICAL_METHOD_NONE;
switch (method) {
case Scheduler::Publish:
icalmethod = ICAL_METHOD_PUBLISH;
break;
case Scheduler::Request:
icalmethod = ICAL_METHOD_REQUEST;
break;
case Scheduler::Refresh:
icalmethod = ICAL_METHOD_REFRESH;
break;
case Scheduler::Cancel:
icalmethod = ICAL_METHOD_CANCEL;
break;
case Scheduler::Add:
icalmethod = ICAL_METHOD_ADD;
break;
case Scheduler::Reply:
icalmethod = ICAL_METHOD_REPLY;
break;
case Scheduler::Counter:
icalmethod = ICAL_METHOD_COUNTER;
break;
case Scheduler::Declinecounter:
icalmethod = ICAL_METHOD_DECLINECOUNTER;
break;
default:
return message;
}
icalcomponent_add_property(message,icalproperty_new_method(icalmethod));
// TODO: check, if dynamic cast is required
- if(incidence->type() == "Todo") {
+ if(incidence->typeID() == todoID ) {
Todo *todo = static_cast<Todo *>(incidence);
icalcomponent_add_component(message,writeTodo(todo));
}
- if(incidence->type() == "Event") {
+ if(incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>(incidence);
icalcomponent_add_component(message,writeEvent(event));
}
- if(incidence->type() == "FreeBusy") {
+ if(incidence->typeID() == freebusyID) {
FreeBusy *freebusy = static_cast<FreeBusy *>(incidence);
icalcomponent_add_component(message,writeFreeBusy(freebusy, method));
}
return message;
}