summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp7
-rw-r--r--libkdepim/phoneaccess.cpp2
2 files changed, 5 insertions, 4 deletions
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 )