summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-14 03:13:52 (UTC)
committer zautrix <zautrix>2004-09-14 03:13:52 (UTC)
commitf1f43030eefa765950cb501aece6cc71fb4e9859 (patch) (unidiff)
treed7396ac13ab052ee38e2e8e139854cc88a289a43
parent5060b0737c0c279859cac3bcfb73d2ac21c6a79e (diff)
downloadkdepimpi-f1f43030eefa765950cb501aece6cc71fb4e9859.zip
kdepimpi-f1f43030eefa765950cb501aece6cc71fb4e9859.tar.gz
kdepimpi-f1f43030eefa765950cb501aece6cc71fb4e9859.tar.bz2
More fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--libkcal/sharpformat.cpp18
2 files changed, 20 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5a6d615..369c7a0 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -729,10 +729,9 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
729 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 729 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
730 bool remCh, locCh; 730 bool remCh, locCh;
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 ) {
737 //qDebug("both not changed "); 736 //qDebug("both not changed ");
738 lastSync = local->lastModified().addDays(1); 737 lastSync = local->lastModified().addDays(1);
@@ -1115,7 +1114,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1115 if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { 1114 if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) {
1116 inL->removeID(mCurrentSyncDevice ); 1115 inL->removeID(mCurrentSyncDevice );
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 );
1120 inR = inL->clone(); 1119 inR = inL->clone();
1121 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1120 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index a53b3f8..e7fc670 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -481,6 +481,9 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
481 inc->setCsum( "Sharp_DTM", QString::number( getCsum( templist ) )); 481 inc->setCsum( "Sharp_DTM", QString::number( getCsum( templist ) ));
482 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 482 inc->setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
483 } 483 }
484 if ( ok && newnum == -1 ) {
485 qDebug("Error writing back %s ", inc->summary().latin1());
486 }
484 } 487 }
485 } 488 }
486 //qDebug("getNumFromRecord returning : %d ", retval); 489 //qDebug("getNumFromRecord returning : %d ", retval);
@@ -532,7 +535,20 @@ bool SharpFormat::save( Calendar *calendar)
532 changeEnt = true; 535 changeEnt = true;
533 } 536 }
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() );
537 QFile file( fileName ); 553 QFile file( fileName );
538 if (!file.open( IO_ReadOnly ) ) { 554 if (!file.open( IO_ReadOnly ) ) {