summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-20 04:35:46 (UTC)
committer zautrix <zautrix>2004-08-20 04:35:46 (UTC)
commitb42c4af4200c67802ee0cc57e10e1464903736b7 (patch) (unidiff)
tree59f35319f3223892e2353bb8a2c72cb9e87ca0f9
parent93decd4185adc7197008e8397cf753a5ab674d99 (diff)
downloadkdepimpi-b42c4af4200c67802ee0cc57e10e1464903736b7.zip
kdepimpi-b42c4af4200c67802ee0cc57e10e1464903736b7.tar.gz
kdepimpi-b42c4af4200c67802ee0cc57e10e1464903736b7.tar.bz2
change reverted
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 820d068..defdb09 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -486,49 +486,49 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
486 return retval; 486 return retval;
487} 487}
488bool SharpFormat::save( Calendar *calendar) 488bool SharpFormat::save( Calendar *calendar)
489{ 489{
490 490
491 QLabel status ( i18n("Processing/adding events ..."), 0 ); 491 QLabel status ( i18n("Processing/adding events ..."), 0 );
492 int w = status.sizeHint().width()+20 ; 492 int w = status.sizeHint().width()+20 ;
493 if ( w < 200 ) w = 200; 493 if ( w < 200 ) w = 200;
494 int h = status.sizeHint().height()+20 ; 494 int h = status.sizeHint().height()+20 ;
495 int dw = QApplication::desktop()->width(); 495 int dw = QApplication::desktop()->width();
496 int dh = QApplication::desktop()->height(); 496 int dh = QApplication::desktop()->height();
497 status.setCaption(i18n("Writing DTM Data") ); 497 status.setCaption(i18n("Writing DTM Data") );
498 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 498 status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
499 status.show(); 499 status.show();
500 status.raise(); 500 status.raise();
501 qApp->processEvents(); 501 qApp->processEvents();
502 bool debug = DEBUGMODE; 502 bool debug = DEBUGMODE;
503 QString codec = "utf8"; 503 QString codec = "utf8";
504 QString answer; 504 QString answer;
505 QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n"; 505 QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n";
506 QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n"; 506 QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n";
507 QString command; 507 QString command;
508 QPtrList<Event> er = calendar->rawEvents(); 508 QPtrList<Event> er = calendar->rawEvents();
509 Event* ev = er.first(); 509 Event* ev = er.first();
510 QString fileName = "/tmp/kdepimtempfile"; 510 QString fileName = "/tmp/kopitempout";
511 int i = 0; 511 int i = 0;
512 QString changeString = ePrefix; 512 QString changeString = ePrefix;
513 QString deleteString = ePrefix; 513 QString deleteString = ePrefix;
514 bool deleteEnt = false; 514 bool deleteEnt = false;
515 bool changeEnt = false; 515 bool changeEnt = false;
516 QString message = i18n("Processing event # "); 516 QString message = i18n("Processing event # ");
517 int procCount = 0; 517 int procCount = 0;
518 while ( ev ) { 518 while ( ev ) {
519 //qDebug("i %d ", ++i); 519 //qDebug("i %d ", ++i);
520 if ( ev->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) { 520 if ( ev->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) {
521 status.setText ( message + QString::number ( ++procCount ) ); 521 status.setText ( message + QString::number ( ++procCount ) );
522 qApp->processEvents(); 522 qApp->processEvents();
523 QString eString = getEventString( ev ); 523 QString eString = getEventString( ev );
524 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete 524 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete
525 // deleting empty strings does not work. 525 // deleting empty strings does not work.
526 // we write first and x and then delete the record with the x 526 // we write first and x and then delete the record with the x
527 eString = eString.replace( QRegExp(",\"\""),",\"x\"" ); 527 eString = eString.replace( QRegExp(",\"\""),",\"x\"" );
528 changeString += eString + "\n"; 528 changeString += eString + "\n";
529 deleteString += eString + "\n"; 529 deleteString += eString + "\n";
530 deleteEnt = true; 530 deleteEnt = true;
531 changeEnt = true; 531 changeEnt = true;
532 } 532 }
533 else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new 533 else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new
534 command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName; 534 command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName;