summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformatimpl.cpp
Unidiff
Diffstat (limited to 'libkcal/icalformatimpl.cpp') (more/less context) (ignore 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
@@ -2152,21 +2152,21 @@ icalcomponent *ICalFormatImpl::createScheduleComponent(IncidenceBase *incidence,
2152 return message; 2152 return message;
2153 } 2153 }
2154 2154
2155 icalcomponent_add_property(message,icalproperty_new_method(icalmethod)); 2155 icalcomponent_add_property(message,icalproperty_new_method(icalmethod));
2156 2156
2157 // TODO: check, if dynamic cast is required 2157 // TODO: check, if dynamic cast is required
2158 if(incidence->type() == "Todo") { 2158 if(incidence->typeID() == todoID ) {
2159 Todo *todo = static_cast<Todo *>(incidence); 2159 Todo *todo = static_cast<Todo *>(incidence);
2160 icalcomponent_add_component(message,writeTodo(todo)); 2160 icalcomponent_add_component(message,writeTodo(todo));
2161 } 2161 }
2162 if(incidence->type() == "Event") { 2162 if(incidence->typeID() == eventID ) {
2163 Event *event = static_cast<Event *>(incidence); 2163 Event *event = static_cast<Event *>(incidence);
2164 icalcomponent_add_component(message,writeEvent(event)); 2164 icalcomponent_add_component(message,writeEvent(event));
2165 } 2165 }
2166 if(incidence->type() == "FreeBusy") { 2166 if(incidence->typeID() == freebusyID) {
2167 FreeBusy *freebusy = static_cast<FreeBusy *>(incidence); 2167 FreeBusy *freebusy = static_cast<FreeBusy *>(incidence);
2168 icalcomponent_add_component(message,writeFreeBusy(freebusy, method)); 2168 icalcomponent_add_component(message,writeFreeBusy(freebusy, method));
2169 } 2169 }
2170 2170
2171 return message; 2171 return message;
2172} 2172}