-rw-r--r-- | libkcal/sharpformat.cpp | 6 | ||||
-rw-r--r-- | libkcal/syncdefines.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index e7fc670..d56eab6 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp | |||
@@ -537,27 +537,27 @@ bool SharpFormat::save( Calendar *calendar) | |||
537 | else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new | 537 | else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new |
538 | QString fileNameIn = "/tmp/kopitempin"; | 538 | QString fileNameIn = "/tmp/kopitempin"; |
539 | QFile fileIn( fileNameIn ); | 539 | QFile fileIn( fileNameIn ); |
540 | if (!fileIn.open( IO_WriteOnly ) ) { | 540 | if (!fileIn.open( IO_WriteOnly ) ) { |
541 | return false; | 541 | return false; |
542 | } | 542 | } |
543 | QTextStream tsIn( &fileIn ); | 543 | QTextStream tsIn( &fileIn ); |
544 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | 544 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); |
545 | tsIn << ePrefix << eString ; | 545 | tsIn << ePrefix << eString ; |
546 | fileIn.close(); | 546 | fileIn.close(); |
547 | //command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName; | 547 | //command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName; |
548 | command = "(cat /tmp/kopitempin | db2file datebook -w -g -c " + codec+ ") > "+ fileName; | 548 | command = "(cat /tmp/kopitempin | db2file datebook -w -g -c " + codec+ ") > "+ fileName; |
549 | qDebug("command ++++++++ "); | 549 | //qDebug("command ++++++++ "); |
550 | qDebug("%s ",command.latin1()); | 550 | //qDebug("%s ",command.latin1()); |
551 | qDebug("command -------- "); | 551 | //qDebug("command -------- "); |
552 | system ( command.utf8() ); | 552 | system ( command.utf8() ); |
553 | QFile file( fileName ); | 553 | QFile file( fileName ); |
554 | if (!file.open( IO_ReadOnly ) ) { | 554 | if (!file.open( IO_ReadOnly ) ) { |
555 | return false; | 555 | return false; |
556 | 556 | ||
557 | } | 557 | } |
558 | QTextStream ts( &file ); | 558 | QTextStream ts( &file ); |
559 | ts.setCodec( QTextCodec::codecForName("utf8") ); | 559 | ts.setCodec( QTextCodec::codecForName("utf8") ); |
560 | answer = ts.read(); | 560 | answer = ts.read(); |
561 | file.close(); | 561 | file.close(); |
562 | //qDebug("answer \n%s ", answer.latin1()); | 562 | //qDebug("answer \n%s ", answer.latin1()); |
563 | getNumFromRecord( answer, ev ) ; | 563 | getNumFromRecord( answer, ev ) ; |
diff --git a/libkcal/syncdefines.h b/libkcal/syncdefines.h index 57642ec..704a670 100644 --- a/libkcal/syncdefines.h +++ b/libkcal/syncdefines.h | |||
@@ -5,18 +5,20 @@ | |||
5 | #define SYNC_PREF_LOCAL 0 | 5 | #define SYNC_PREF_LOCAL 0 |
6 | #define SYNC_PREF_REMOTE 1 | 6 | #define SYNC_PREF_REMOTE 1 |
7 | #define SYNC_PREF_NEWEST 2 | 7 | #define SYNC_PREF_NEWEST 2 |
8 | #define SYNC_PREF_ASK 3 | 8 | #define SYNC_PREF_ASK 3 |
9 | #define SYNC_PREF_FORCE_LOCAL 4 | 9 | #define SYNC_PREF_FORCE_LOCAL 4 |
10 | #define SYNC_PREF_FORCE_REMOTE 5 | 10 | #define SYNC_PREF_FORCE_REMOTE 5 |
11 | #define SYNC_PREF_TAKE_BOTH 6 | 11 | #define SYNC_PREF_TAKE_BOTH 6 |
12 | 12 | ||
13 | #define SYNC_MODE_NORMAL 0 | 13 | #define SYNC_MODE_NORMAL 0 |
14 | #define SYNC_MODE_EXTERNAL 1 | 14 | #define SYNC_MODE_EXTERNAL 1 |
15 | 15 | ||
16 | #define SYNC_TEMPSTATE_INITIAL 0 | 16 | #define SYNC_TEMPSTATE_INITIAL 0 |
17 | #define SYNC_TEMPSTATE_ADDED_EXTERNAL -1 | ||
17 | #define SYNC_TEMPSTATE_NEW_EXTERNAL -2 | 18 | #define SYNC_TEMPSTATE_NEW_EXTERNAL -2 |
18 | #define SYNC_TEMPSTATE_DELETE -3 | 19 | #define SYNC_TEMPSTATE_DELETE -3 |
19 | #define SYNC_TEMPSTATE_NEW_ID -4 | 20 | #define SYNC_TEMPSTATE_NEW_ID -4 |
21 | #define SYNC_TEMPSTATE_NEW_CSUM -5 | ||
20 | 22 | ||
21 | 23 | ||
22 | #endif | 24 | #endif |