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
@@ -2155,15 +2155,15 @@ icalcomponent *ICalFormatImpl::createScheduleComponent(IncidenceBase *incidence,
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));
}