summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Unidiff
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp7
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
@@ -42,12 +42,13 @@
42#include "vcalformat.h" 42#include "vcalformat.h"
43 43
44using namespace KCal; 44using namespace KCal;
45 45
46VCalFormat::VCalFormat() 46VCalFormat::VCalFormat()
47{ 47{
48 mCalendar = 0;
48} 49}
49 50
50VCalFormat::~VCalFormat() 51VCalFormat::~VCalFormat()
51{ 52{
52} 53}
53 54
@@ -162,24 +163,26 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text )
162 163
163 deleteVObject( vcal ); 164 deleteVObject( vcal );
164 165
165 return true; 166 return true;
166} 167}
167 168
168QString VCalFormat::eventToString( Event * event) 169QString 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}
177QString VCalFormat::todoToString( Todo * todo ) 179QString 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 );
184 return result; 187 return result;
185} 188}