From 793d117812b4da36c9c11d90cccba347cbc6e208 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 08 Jun 2005 10:34:22 +0000 Subject: changed incidence type to a faster access method --- (limited to 'libkcal/icalformat.cpp') diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 3a2aac6..d9fe40b 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -384,12 +384,12 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal, Incidence *existingIncidence = cal->event(incidence->uid()); if (existingIncidence) { // TODO: check, if cast is required, or if it can be done by virtual funcs. - if (existingIncidence->type() == "Todo") { + if (existingIncidence->typeID() == todoID ) { Todo *todo = static_cast(existingIncidence); icalcomponent_add_component(calendarComponent, mImpl->writeTodo(todo)); } - if (existingIncidence->type() == "Event") { + if (existingIncidence->typeID() == eventID ) { Event *event = static_cast(existingIncidence); icalcomponent_add_component(calendarComponent, mImpl->writeEvent(event)); -- cgit v0.9.0.2