-rw-r--r-- | kde2file/abdump/abdump.pro | 2 | ||||
-rw-r--r-- | kde2file/caldump/caldump.pro | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 82 |
3 files changed, 60 insertions, 26 deletions
diff --git a/kde2file/abdump/abdump.pro b/kde2file/abdump/abdump.pro index b6b6374..99aea44 100644 --- a/kde2file/abdump/abdump.pro +++ b/kde2file/abdump/abdump.pro | |||
@@ -2,9 +2,9 @@ | |||
2 | TEMPLATE = app | 2 | TEMPLATE = app |
3 | CONFIG += qt | 3 | CONFIG += qt |
4 | include( ../../variables.pri ) | 4 | include( ../../variables.pri ) |
5 | DESTDIR= ../../bin | 5 | DESTDIR= ../../bin |
6 | TARGET = kdeabdump | 6 | TARGET = kdeabdump34 |
7 | INCLUDEPATH += . $(KDEDIR)/include $(KDE_DEV_DIR)/libkdepim | 7 | INCLUDEPATH += . $(KDEDIR)/include $(KDE_DEV_DIR)/libkdepim |
8 | #LIBS += $(KDEDIR)/lib/libkcal.so | 8 | #LIBS += $(KDEDIR)/lib/libkcal.so |
9 | LIBS += $(KDEDIR)/lib/libkabc.so | 9 | LIBS += $(KDEDIR)/lib/libkabc.so |
10 | LIBS += $(KDEDIR)/lib/libkdepim.so | 10 | LIBS += $(KDEDIR)/lib/libkdepim.so |
diff --git a/kde2file/caldump/caldump.pro b/kde2file/caldump/caldump.pro index 8f08cc4..a9310d1 100644 --- a/kde2file/caldump/caldump.pro +++ b/kde2file/caldump/caldump.pro | |||
@@ -2,9 +2,9 @@ | |||
2 | TEMPLATE = app | 2 | TEMPLATE = app |
3 | CONFIG += qt | 3 | CONFIG += qt |
4 | include( ../../variables.pri ) | 4 | include( ../../variables.pri ) |
5 | DESTDIR= ../../bin | 5 | DESTDIR= ../../bin |
6 | TARGET = kdecaldump | 6 | TARGET = kdecaldump34 |
7 | INCLUDEPATH += . $(KDEDIR)/include $(KDEDIR)/include/libkcal $(KDE_DEV_DIR)/libkdepim | 7 | INCLUDEPATH += . $(KDEDIR)/include $(KDEDIR)/include/libkcal $(KDE_DEV_DIR)/libkdepim |
8 | LIBS += $(KDEDIR)/lib/libkcal.so | 8 | LIBS += $(KDEDIR)/lib/libkcal.so |
9 | LIBS += $(KDEDIR)/lib/libkdepim.so | 9 | LIBS += $(KDEDIR)/lib/libkdepim.so |
10 | HEADERS += | 10 | HEADERS += |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 184cb39..85a2aeb 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -908,52 +908,86 @@ void KSyncManager::syncKDE() | |||
908 | { | 908 | { |
909 | case (KAPI): | 909 | case (KAPI): |
910 | { | 910 | { |
911 | #ifdef DESKTOP_VERSION | 911 | #ifdef DESKTOP_VERSION |
912 | QString command = qApp->applicationDirPath () + "/kdeabdump"; | 912 | QString command = "kdeabdump33"; |
913 | QString commandfile = "kdeabdump33"; | ||
914 | QString commandpath = qApp->applicationDirPath () + "/"; | ||
913 | #else | 915 | #else |
914 | QString command = "kdeabdump"; | 916 | QString command = "kdeabdump33"; |
917 | QString commandfile = "kdeabdump33"; | ||
918 | QString commandpath = QDir::homeDirPath ()+"/"; | ||
915 | #endif | 919 | #endif |
916 | if ( ! QFile::exists ( command ) ) | 920 | if ( ! QFile::exists ( commandpath+commandfile ) ) |
917 | command = "kdeabdump"; | 921 | command = commandfile; |
922 | else | ||
923 | command = commandpath+commandfile; | ||
924 | |||
918 | QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; | 925 | QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; |
919 | int result = system ( command.latin1()); | 926 | int result = system ( command.latin1()); |
920 | qDebug("AB dump command call result: %d ", result); | 927 | qDebug("AB dump 33 command call result: %d ", result); |
921 | if ( result != 0 ) { | 928 | if ( result != 0 ) { |
922 | 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 | qDebug("Calling AB dump version 33 failed. Trying 34... "); |
923 | return; | 930 | commandfile = "kdeabdump34"; |
931 | if ( ! QFile::exists ( commandpath+commandfile ) ) | ||
932 | command = commandfile; | ||
933 | else | ||
934 | command = commandpath+commandfile; | ||
935 | result = system ( command.latin1()); | ||
936 | qDebug("AB dump 34 command call result: %d ", result); | ||
937 | if ( result != 0 ) { | ||
938 | KMessageBox::error( 0, i18n("Error accessing KDE addressbook data.\nMake sure the file\n%1kdeabdump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath )); | ||
939 | return; | ||
940 | } | ||
924 | } | 941 | } |
925 | if ( syncWithFile( fileName,true ) ) { | 942 | if ( syncWithFile( fileName,true ) ) { |
926 | if ( mWriteBackFile ) { | 943 | if ( mWriteBackFile ) { |
927 | command += " --read"; | 944 | command += " --read"; |
928 | system ( command.latin1()); | 945 | system ( command.latin1()); |
929 | } | ||
930 | } | 946 | } |
947 | } | ||
931 | 948 | ||
932 | } | 949 | } |
933 | break; | 950 | break; |
934 | case (KOPI): | 951 | case (KOPI): |
935 | { | 952 | { |
936 | #ifdef DESKTOP_VERSION | 953 | #ifdef DESKTOP_VERSION |
937 | QString command = qApp->applicationDirPath () + "/kdecaldump"; | 954 | QString command = "kdecaldump33"; |
955 | QString commandfile = "kdecaldump33"; | ||
956 | QString commandpath = qApp->applicationDirPath () + "/"; | ||
938 | #else | 957 | #else |
939 | QString command = "kdecaldump"; | 958 | QString command = "kdecaldump33"; |
959 | QString commandfile = "kdecaldump33"; | ||
960 | QString commandpath = QDir::homeDirPath ()+"/"; | ||
940 | #endif | 961 | #endif |
941 | if ( ! QFile::exists ( command ) ) | 962 | if ( ! QFile::exists ( commandpath+commandfile ) ) |
942 | command = "kdecaldump"; | 963 | command = commandfile; |
964 | else | ||
965 | command = commandpath+commandfile; | ||
966 | |||
943 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; | 967 | QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; |
944 | int result = system ( command.latin1()); | 968 | int result = system ( command.latin1()); |
945 | qDebug("Cal dump command call result result: %d ", result); | 969 | qDebug("Cal dump 33 command call result result: %d ", result); |
946 | if ( result != 0 ) { | 970 | if ( result != 0 ) { |
947 | 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.")); | 971 | qDebug("Calling CAL dump version 33 failed. Trying 34... "); |
948 | return; | 972 | commandfile = "kdecaldump34"; |
973 | if ( ! QFile::exists ( commandpath+commandfile ) ) | ||
974 | command = commandfile; | ||
975 | else | ||
976 | command = commandpath+commandfile; | ||
977 | result = system ( command.latin1()); | ||
978 | qDebug("Cal dump 34 command call result result: %d ", result); | ||
979 | if ( result != 0 ) { | ||
980 | KMessageBox::error( 0, i18n("Error accessing KDE calendar data.\nMake sure the file\n%1kdecaldump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath )); | ||
981 | return; | ||
982 | } | ||
949 | } | 983 | } |
950 | if ( syncWithFile( fileName,true ) ) { | 984 | if ( syncWithFile( fileName,true ) ) { |
951 | if ( mWriteBackFile ) { | 985 | if ( mWriteBackFile ) { |
952 | command += " --read"; | 986 | command += " --read"; |
953 | system ( command.latin1()); | 987 | system ( command.latin1()); |
954 | } | ||
955 | } | 988 | } |
989 | } | ||
956 | 990 | ||
957 | } | 991 | } |
958 | break; | 992 | break; |
959 | case (PWMPI): | 993 | case (PWMPI): |