From dddcb44c8428e9054a91eea0c7483ee88ee03452 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 14 Oct 2004 10:19:14 +0000 Subject: phone calendar fixes --- (limited to 'libkcal/phoneformat.cpp') diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 3555dc6..281434e 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -296,9 +296,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) fileName = "/tmp/phonefile.vcs"; #endif QString command; - int ret = PhoneAccess::readFromPhone( fileName ); - if ( ret != 0 ) { - qDebug("Error::command returned %d", ret); + if ( ! PhoneAccess::readFromPhone( fileName )) { return false; } VCalFormat vfload; @@ -487,8 +485,11 @@ bool PhoneFormat::writeToPhone( Calendar * calendar) VCalFormat vfsave; vfsave.setLocalTime ( true ); + QString id = calendar->timeZoneId(); + calendar->setLocalTime(); if ( ! vfsave.save( calendar, fileName ) ) return false; + calendar->setTimeZoneId( id ); return PhoneAccess::writeToPhone( fileName ); } bool PhoneFormat::save( Calendar *calendar) -- cgit v0.9.0.2