summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-03 09:34:07 (UTC)
committer zautrix <zautrix>2005-04-03 09:34:07 (UTC)
commit4f800d49800f8d0b1e7b0af8aacea6dbeb78e67c (patch) (side-by-side diff)
tree369a243d3cb006d330686368d5397e264947e38e
parent4017b5fccc188c74e971c573dbb6154ce877807b (diff)
downloadkdepimpi-4f800d49800f8d0b1e7b0af8aacea6dbeb78e67c.zip
kdepimpi-4f800d49800f8d0b1e7b0af8aacea6dbeb78e67c.tar.gz
kdepimpi-4f800d49800f8d0b1e7b0af8aacea6dbeb78e67c.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kde2file/abdump/abdump.pro2
-rw-r--r--kde2file/caldump/caldump.pro2
-rw-r--r--libkdepim/ksyncmanager.cpp58
3 files changed, 48 insertions, 14 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 @@
TEMPLATE = app
CONFIG += qt
include( ../../variables.pri )
DESTDIR= ../../bin
-TARGET = kdeabdump
+TARGET = kdeabdump34
INCLUDEPATH += . $(KDEDIR)/include $(KDE_DEV_DIR)/libkdepim
#LIBS += $(KDEDIR)/lib/libkcal.so
LIBS += $(KDEDIR)/lib/libkabc.so
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 @@
TEMPLATE = app
CONFIG += qt
include( ../../variables.pri )
DESTDIR= ../../bin
-TARGET = kdecaldump
+TARGET = kdecaldump34
INCLUDEPATH += . $(KDEDIR)/include $(KDEDIR)/include/libkcal $(KDE_DEV_DIR)/libkdepim
LIBS += $(KDEDIR)/lib/libkcal.so
LIBS += $(KDEDIR)/lib/libkdepim.so
HEADERS +=
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 184cb39..85a2aeb 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -908,21 +908,38 @@ void KSyncManager::syncKDE()
{
case (KAPI):
{
#ifdef DESKTOP_VERSION
- QString command = qApp->applicationDirPath () + "/kdeabdump";
+ QString command = "kdeabdump33";
+ QString commandfile = "kdeabdump33";
+ QString commandpath = qApp->applicationDirPath () + "/";
#else
- QString command = "kdeabdump";
+ QString command = "kdeabdump33";
+ QString commandfile = "kdeabdump33";
+ QString commandpath = QDir::homeDirPath ()+"/";
#endif
- if ( ! QFile::exists ( command ) )
- command = "kdeabdump";
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+
QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf";
int result = system ( command.latin1());
- qDebug("AB dump command call result: %d ", result);
+ qDebug("AB dump 33 command call result: %d ", result);
if ( result != 0 ) {
- 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."));
+ qDebug("Calling AB dump version 33 failed. Trying 34... ");
+ commandfile = "kdeabdump34";
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+ result = system ( command.latin1());
+ qDebug("AB dump 34 command call result: %d ", result);
+ if ( result != 0 ) {
+ 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 ));
return;
}
+ }
if ( syncWithFile( fileName,true ) ) {
if ( mWriteBackFile ) {
command += " --read";
system ( command.latin1());
@@ -933,21 +950,38 @@ void KSyncManager::syncKDE()
break;
case (KOPI):
{
#ifdef DESKTOP_VERSION
- QString command = qApp->applicationDirPath () + "/kdecaldump";
+ QString command = "kdecaldump33";
+ QString commandfile = "kdecaldump33";
+ QString commandpath = qApp->applicationDirPath () + "/";
#else
- QString command = "kdecaldump";
+ QString command = "kdecaldump33";
+ QString commandfile = "kdecaldump33";
+ QString commandpath = QDir::homeDirPath ()+"/";
#endif
- if ( ! QFile::exists ( command ) )
- command = "kdecaldump";
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+
QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics";
int result = system ( command.latin1());
- qDebug("Cal dump command call result result: %d ", result);
+ qDebug("Cal dump 33 command call result result: %d ", result);
if ( result != 0 ) {
- 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."));
+ qDebug("Calling CAL dump version 33 failed. Trying 34... ");
+ commandfile = "kdecaldump34";
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+ result = system ( command.latin1());
+ qDebug("Cal dump 34 command call result result: %d ", result);
+ if ( result != 0 ) {
+ 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 ));
return;
}
+ }
if ( syncWithFile( fileName,true ) ) {
if ( mWriteBackFile ) {
command += " --read";
system ( command.latin1());