From dddcb44c8428e9054a91eea0c7483ee88ee03452 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 14 Oct 2004 10:19:14 +0000 Subject: phone calendar fixes --- 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) diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index 5fafa1f..8298aa6 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -163,7 +163,7 @@ bool PhoneAccess::readFromPhone( QString fileName) #endif int ret; while ( (ret = system ( command.latin1())) != 0 ) { - qDebug("Error S::command returned %d.", ret); + qDebug("Error reading from phone:Command returned %d", ret); int retval = KMessageBox::warningContinueCancel(0, i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KDE/Pim phone access"),i18n("Retry"),i18n("Cancel")); if ( retval != KMessageBox::Continue ) -- cgit v0.9.0.2