-rw-r--r-- | libkcal/vcalformat.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 1167e58..076cd3f 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp | |||
@@ -44,8 +44,9 @@ | |||
44 | using namespace KCal; | 44 | using namespace KCal; |
45 | 45 | ||
46 | VCalFormat::VCalFormat() | 46 | VCalFormat::VCalFormat() |
47 | { | 47 | { |
48 | mCalendar = 0; | ||
48 | } | 49 | } |
49 | 50 | ||
50 | VCalFormat::~VCalFormat() | 51 | VCalFormat::~VCalFormat() |
51 | { | 52 | { |
@@ -164,20 +165,22 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) | |||
164 | 165 | ||
165 | return true; | 166 | return true; |
166 | } | 167 | } |
167 | 168 | ||
168 | QString VCalFormat::eventToString( Event * event) | 169 | QString VCalFormat::eventToString( Event * event, Calendar *calendar) |
169 | { | 170 | { |
170 | if ( !event ) return QString::null; | 171 | if ( !event ) return QString::null; |
172 | mCalendar = calendar; | ||
171 | VObject *vevent = eventToVEvent( event ); | 173 | VObject *vevent = eventToVEvent( event ); |
172 | char *buf = writeMemVObject( 0, 0, vevent ); | 174 | char *buf = writeMemVObject( 0, 0, vevent ); |
173 | QString result( buf ); | 175 | QString result( buf ); |
174 | cleanVObject( vevent ); | 176 | cleanVObject( vevent ); |
175 | return result; | 177 | return result; |
176 | } | 178 | } |
177 | QString VCalFormat::todoToString( Todo * todo ) | 179 | QString VCalFormat::todoToString( Todo * todo, Calendar *calendar ) |
178 | { | 180 | { |
179 | if ( !todo ) return QString::null; | 181 | if ( !todo ) return QString::null; |
182 | mCalendar = calendar; | ||
180 | VObject *vevent = eventToVTodo( todo ); | 183 | VObject *vevent = eventToVTodo( todo ); |
181 | char *buf = writeMemVObject( 0, 0, vevent ); | 184 | char *buf = writeMemVObject( 0, 0, vevent ); |
182 | QString result( buf ); | 185 | QString result( buf ); |
183 | cleanVObject( vevent ); | 186 | cleanVObject( vevent ); |