summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Side-by-side diff
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
@@ -40,16 +40,17 @@
#include "calendar.h"
#include "vcalformat.h"
using namespace KCal;
VCalFormat::VCalFormat()
{
+ mCalendar = 0;
}
VCalFormat::~VCalFormat()
{
}
bool VCalFormat::load(Calendar *calendar, const QString &fileName)
{
@@ -160,28 +161,30 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text )
return false;
}
deleteVObject( vcal );
return true;
}
-QString VCalFormat::eventToString( Event * event)
+QString VCalFormat::eventToString( Event * event, Calendar *calendar)
{
if ( !event ) return QString::null;
+ mCalendar = calendar;
VObject *vevent = eventToVEvent( event );
char *buf = writeMemVObject( 0, 0, vevent );
QString result( buf );
cleanVObject( vevent );
return result;
}
-QString VCalFormat::todoToString( Todo * todo )
+QString VCalFormat::todoToString( Todo * todo, Calendar *calendar )
{
if ( !todo ) return QString::null;
+ mCalendar = calendar;
VObject *vevent = eventToVTodo( todo );
char *buf = writeMemVObject( 0, 0, vevent );
QString result( buf );
cleanVObject( vevent );
return result;
}
QString VCalFormat::toString( Calendar *calendar )