summaryrefslogtreecommitdiffabout
path: root/libkcal
Side-by-side diff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 0bc9125..2ad1b5a 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -275,25 +275,26 @@ ulong PhoneFormat::getCsum( const QStringList & attList)
//extern "C" GSM_Error GSM_InitConnection(GSM_StateMachine *s, int ReplyNum);
#include <stdlib.h>
#define DEBUGMODE false
bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
{
QString fileName;
#ifdef _WIN32_
fileName = locateLocal("data", "korganizer") + "\\tempfile.vcs";
#else
fileName = "/tmp/kdepimtemp.vcs";
#endif
- QString command ="./kammu --backup " + fileName + " -yes";
+ QString command ="./kammu --backup " + fileName + " -yes -C" +
+ mConnection +" -D" + mDevice +" -M" + mModel;
int ret = system ( command.latin1() );
if ( ret != 0 )
return false;
VCalFormat vfload;
vfload.setLocalTime ( true );
if ( ! vfload.load( calendar, fileName ) )
return false;
QPtrList<Event> er = calendar->rawEvents();
Event* ev = er.first();
while ( ev ) {
int id = ev->pilotId();
Event *event;
@@ -479,25 +480,26 @@ bool PhoneFormat::save( Calendar *calendar)
while ( to ) {
if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
calendar->deleteTodo( to );
}
to = tl.next();
}
// 3 save file
VCalFormat vfsave;
vfsave.setLocalTime ( true );
if ( ! vfsave.save( calendar, fileName ) )
return false;
// 4 call kammu
- QString command ="./kammu --restore " + fileName ;
+ QString command ="./kammu --restore " + fileName + " -C" +
+ mConnection +" -D" + mDevice +" -M" + mModel;;
int ret = system ( command.latin1() );
if ( ret != 0 )
return false;
// 5 reread data
message = i18n(" Rereading all data ... ");
status.setText ( message );
qApp->processEvents();
CalendarLocal* calendarTemp = new CalendarLocal();
calendarTemp->setTimeZoneId( calendar->timeZoneId());
if ( ! load( calendarTemp,calendar) ){
qDebug("error reloading calendar ");
delete calendarTemp;