-rw-r--r-- | libkdepim/ksyncmanager.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index e09050e..17e6c75 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -187,6 +187,7 @@ void KSyncManager::slotSyncMenu( int action ) | |||
187 | qDebug("syncaction %d ", action); | 187 | qDebug("syncaction %d ", action); |
188 | if ( action == 5000 ) | 188 | if ( action == 5000 ) |
189 | return; | 189 | return; |
190 | mSyncWithDesktop = false; | ||
190 | if ( action == 0 ) { | 191 | if ( action == 0 ) { |
191 | 192 | ||
192 | // seems to be a Qt2 event handling bug | 193 | // seems to be a Qt2 event handling bug |
@@ -251,6 +252,7 @@ void KSyncManager::slotSyncMenu( int action ) | |||
251 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); | 252 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); |
252 | 253 | ||
253 | if ( action == 1000 ) { | 254 | if ( action == 1000 ) { |
255 | mIsKapiFile = false; | ||
254 | #ifdef DESKTOP_VERSION | 256 | #ifdef DESKTOP_VERSION |
255 | syncKDE(); | 257 | syncKDE(); |
256 | #else | 258 | #else |
@@ -882,11 +884,29 @@ void KSyncManager::confSync() | |||
882 | } | 884 | } |
883 | void KSyncManager::syncKDE() | 885 | void KSyncManager::syncKDE() |
884 | { | 886 | { |
887 | mSyncWithDesktop = true; | ||
885 | emit save(); | 888 | emit save(); |
886 | switch(mTargetApp) | 889 | switch(mTargetApp) |
887 | { | 890 | { |
888 | case (KAPI): | 891 | case (KAPI): |
889 | 892 | { | |
893 | #ifdef DESKTOP_VERSION | ||
894 | QString command = qApp->applicationDirPath () + "/kdeabdump"; | ||
895 | #else | ||
896 | QString command = "kdeabdump"; | ||
897 | #endif | ||
898 | if ( ! QFile::exists ( command ) ) | ||
899 | command = "kdeabdump"; | ||
900 | QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; | ||
901 | system ( command.latin1()); | ||
902 | if ( syncWithFile( fileName,true ) ) { | ||
903 | if ( mWriteBackFile ) { | ||
904 | command += " --read"; | ||
905 | system ( command.latin1()); | ||
906 | } | ||
907 | } | ||
908 | |||
909 | } | ||
890 | break; | 910 | break; |
891 | case (KOPI): | 911 | case (KOPI): |
892 | { | 912 | { |