author | zautrix <zautrix> | 2005-03-18 17:56:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-18 17:56:55 (UTC) |
commit | d6438efc4c7cff39024b65bfd1d2f810212da544 (patch) (unidiff) | |
tree | badb4c48d83477dd1027af1807cb2b6ed09db52a | |
parent | f9f521c487143641b2cf077d04fe1c475001bce2 (diff) | |
download | kdepimpi-d6438efc4c7cff39024b65bfd1d2f810212da544.zip kdepimpi-d6438efc4c7cff39024b65bfd1d2f810212da544.tar.gz kdepimpi-d6438efc4c7cff39024b65bfd1d2f810212da544.tar.bz2 |
kde sync fixes
-rw-r--r-- | kde2file/abdump/main.cpp | 5 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/kde2file/abdump/main.cpp b/kde2file/abdump/main.cpp index 9ad78e5..b359cfe 100644 --- a/kde2file/abdump/main.cpp +++ b/kde2file/abdump/main.cpp | |||
@@ -179,15 +179,18 @@ int main( int argc, char *argv[] ) | |||
179 | standardAddressBook->setAutomaticSave( true ); | 179 | standardAddressBook->setAutomaticSave( true ); |
180 | qDebug("************************************* "); | 180 | qDebug("************************************* "); |
181 | qDebug("*************kdeABdump*************** "); | 181 | qDebug("*************kdeABdump*************** "); |
182 | qDebug("************************************* "); | 182 | qDebug("************************************* "); |
183 | qDebug("Addressbook entries\nchanged %d\ndeleted %d\nadded %d\nfrom file %s", changedC,deleted, added, fileName.latin1()); | 183 | qDebug("Addressbook entries\nchanged %d\ndeleted %d\nadded %d\nfrom file %s", changedC,deleted, added, fileName.latin1()); |
184 | } else | 184 | } else |
185 | qDebug("error open file "); | 185 | qDebug("error open file "); |
186 | } | 186 | } |
187 | standardAddressBook->close(); | ||
188 | // line not needed by KDE 3.4: | ||
189 | // delete standardAddressBook; | ||
190 | |||
187 | 191 | ||
188 | delete standardAddressBook; | ||
189 | //KABC::StdAddressBook::close(); | 192 | //KABC::StdAddressBook::close(); |
190 | //StdAddressBook::mSelf = 0; | 193 | //StdAddressBook::mSelf = 0; |
191 | qDebug("ente "); | 194 | qDebug("ente "); |
192 | return 0; | 195 | return 0; |
193 | } | 196 | } |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index d59f4a4..7319285 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -917,17 +917,22 @@ void KSyncManager::syncKDE() | |||
917 | #ifdef DESKTOP_VERSION | 917 | #ifdef DESKTOP_VERSION |
918 | QString command = qApp->applicationDirPath () + "/kdeabdump"; | 918 | QString command = qApp->applicationDirPath () + "/kdeabdump"; |
919 | #else | 919 | #else |
920 | QString command = "kdeabdump"; | 920 | QString command = "kdeabdump"; |
921 | #endif | 921 | #endif |
922 | if ( ! QFile::exists ( command ) ) | 922 | if ( ! QFile::exists ( command ) ) |
923 | command = "kdeabdump"; | 923 | command = "kdeabdump"; |
924 | QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; | 924 | QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; |
925 | system ( command.latin1()); | 925 | int result = system ( command.latin1()); |
926 | qDebug("AB dump command call result: %d ", result); | ||
927 | if ( result != 0 ) { | ||
928 | KMessageBox::error( 0, i18n("Error accessing KDE addressbook data.\nMake sure the file\n/opt/kdepimpi/kdeabdump\nexists.The standard version of this file\nis for syncing with KDE 3.4.x.\nIf you are running KDE 3.3.x please\ndownload the KDE 3.3.x version of this file\nat http://sourceforge.net/projects/kdepimpi/\nsection: general files for KDE/Pim.")); | ||
929 | return; | ||
930 | } | ||
926 | if ( syncWithFile( fileName,true ) ) { | 931 | if ( syncWithFile( fileName,true ) ) { |
927 | if ( mWriteBackFile ) { | 932 | if ( mWriteBackFile ) { |
928 | command += " --read"; | 933 | command += " --read"; |
929 | system ( command.latin1()); | 934 | system ( command.latin1()); |
930 | } | 935 | } |
931 | } | 936 | } |
932 | 937 | ||
933 | } | 938 | } |
@@ -937,17 +942,22 @@ void KSyncManager::syncKDE() | |||
937 | #ifdef DESKTOP_VERSION | 942 | #ifdef DESKTOP_VERSION |
938 | QString command = qApp->applicationDirPath () + "/kdecaldump"; | 943 | QString command = qApp->applicationDirPath () + "/kdecaldump"; |
939 | #else | 944 | #else |
940 | QString command = "kdecaldump"; | 945 | QString command = "kdecaldump"; |
941 | #endif | 946 | #endif |
942 | if ( ! QFile::exists ( command ) ) | 947 | if ( ! QFile::exists ( command ) ) |
943 | command = "kdecaldump"; | 948 | command = "kdecaldump"; |
944 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; | 949 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; |
945 | system ( command.latin1()); | 950 | int result = system ( command.latin1()); |
951 | qDebug("Cal dump command call result result: %d ", result); | ||
952 | if ( result != 0 ) { | ||
953 | KMessageBox::error( 0, i18n("Error accessing KDE calendar data.\nMake sure the file\n/opt/kdepimpi/kdecaldump\nexists.The standard version of this file\nis for syncing with KDE 3.4.x.\nIf you are running KDE 3.3.x please\ndownload the KDE 3.3.x version of this file\nat http://sourceforge.net/projects/kdepimpi/\nsection: general files for KDE/Pim.")); | ||
954 | return; | ||
955 | } | ||
946 | if ( syncWithFile( fileName,true ) ) { | 956 | if ( syncWithFile( fileName,true ) ) { |
947 | if ( mWriteBackFile ) { | 957 | if ( mWriteBackFile ) { |
948 | command += " --read"; | 958 | command += " --read"; |
949 | system ( command.latin1()); | 959 | system ( command.latin1()); |
950 | } | 960 | } |
951 | } | 961 | } |
952 | 962 | ||
953 | } | 963 | } |