-rw-r--r-- | korganizer/calendarview.cpp | 9 | ||||
-rw-r--r-- | libkcal/sharpformat.cpp | 18 |
2 files changed, 21 insertions, 6 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 5a6d615..369c7a0 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -731,6 +731,5 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
731 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 731 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
732 | if ( remCh ) | 732 | //if ( remCh ) |
733 | qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 733 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
734 | locCh = ( local->lastModified() > mLastCalendarSync ); | 734 | locCh = ( local->lastModified() > mLastCalendarSync ); |
735 | //qDebug("locCh %d remCh %d locuid %d remuid %d", locCh, remCh,local->zaurusUid(), remote->zaurusUid() ); | ||
736 | if ( !remCh && ! locCh ) { | 735 | if ( !remCh && ! locCh ) { |
@@ -740,3 +739,3 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
740 | if ( locCh ) { | 739 | if ( locCh ) { |
741 | // qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1()); | 740 | //qDebug("loc changed %d %s %s", local->revision() , local->lastModified().toString().latin1(), mLastCalendarSync.toString().latin1()); |
742 | lastSync = local->lastModified().addDays( -1 ); | 741 | lastSync = local->lastModified().addDays( -1 ); |
@@ -1117,3 +1116,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1117 | ++addedEventR; | 1116 | ++addedEventR; |
1118 | qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1117 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1119 | inL->setLastModified( modifiedCalendar ); | 1118 | inL->setLastModified( modifiedCalendar ); |
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index a53b3f8..e7fc670 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp | |||
@@ -483,2 +483,5 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc ) | |||
483 | } | 483 | } |
484 | if ( ok && newnum == -1 ) { | ||
485 | qDebug("Error writing back %s ", inc->summary().latin1()); | ||
486 | } | ||
484 | } | 487 | } |
@@ -534,3 +537,16 @@ bool SharpFormat::save( Calendar *calendar) | |||
534 | else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new | 537 | else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new |
535 | command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName; | 538 | QString fileNameIn = "/tmp/kopitempin"; |
539 | QFile fileIn( fileNameIn ); | ||
540 | if (!fileIn.open( IO_WriteOnly ) ) { | ||
541 | return false; | ||
542 | } | ||
543 | QTextStream tsIn( &fileIn ); | ||
544 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | ||
545 | tsIn << ePrefix << eString ; | ||
546 | fileIn.close(); | ||
547 | //command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName; | ||
548 | command = "(cat /tmp/kopitempin | db2file datebook -w -g -c " + codec+ ") > "+ fileName; | ||
549 | qDebug("command ++++++++ "); | ||
550 | qDebug("%s ",command.latin1()); | ||
551 | qDebug("command -------- "); | ||
536 | system ( command.utf8() ); | 552 | system ( command.utf8() ); |