summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-09 10:29:56 (UTC)
committer zautrix <zautrix>2004-10-09 10:29:56 (UTC)
commited1eac5e36e675b030cb5a5aa90fb2d44eb40c73 (patch) (side-by-side diff)
tree2d4dd35819f17c4b5758b64defd40e7a4bf3cbde
parent69af2ac56474e3a1e3e59be318caf53f5d357f94 (diff)
downloadkdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.zip
kdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.tar.gz
kdepimpi-ed1eac5e36e675b030cb5a5aa90fb2d44eb40c73.tar.bz2
phone fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp1
-rw-r--r--kaddressbook/kabcore.cpp3
-rw-r--r--libkdepim/phoneaccess.cpp6
3 files changed, 8 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 1a06956..1050f55 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -31,24 +31,25 @@ $Id$
#include <qregexp.h>
#include <qtimer.h>
#include <kapplication.h>
#include <kinstance.h>
#include <kstandarddirs.h>
#include "errorhandler.h"
*/
#include <qptrlist.h>
#include <qtextstream.h>
#include <qfile.h>
+#include <qregexp.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <libkcal/syncdefines.h>
#include "addressbook.h"
#include "resource.h"
#include "vcardconverter.h"
#include "vcardparser/vcardtool.h"
//US #include "addressbook.moc"
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index efcd492..7ec3fca 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2800,25 +2800,26 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
//AddressBook::Iterator it;
//QStringList vcards;
//for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
// qDebug("Name %s ", (*it).familyName().latin1());
//}
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
if ( syncOK ) {
if ( syncManager->mWriteBackFile )
{
if ( external )
abLocal.removeSyncAddressees( !isXML);
qDebug("Saving remote AB ");
- abLocal.saveAB();
+ if ( ! abLocal.saveAB())
+ qDebug("Error writing back AB to file ");
if ( isXML ) {
// afterwrite processing
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
}
}
}
setModified();
}
if ( syncOK )
mViewManager->refreshView();
return syncOK;
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 357cd39..fe914dd 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -122,26 +122,30 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
QTextStream ts( &file );
ts << content ;
file.close();
}
}
bool PhoneAccess::writeToPhone( QString fileName)
{
#ifdef DESKTOP_VERSION
+#ifdef _WIN32_
+ QString command ="kammu --restore " + fileName ;
+#else
QString command ="./kammu --restore " + fileName ;
+#endif
#else
QString command ="kammu --restore " + fileName ;
#endif
int ret;
while ( (ret = system ( command.latin1())) != 0 ) {
- qDebug("Error S::command returned %d. asking users", ret);
+ qDebug("Error S::command returned %d.", ret);
int retval = KMessageBox::warningContinueCancel(0,
i18n("Error accessing device!\nPlease turn on connection\nand retry!"),i18n("KO/Pi phone access"),i18n("Retry"),i18n("Cancel"));
if ( retval != KMessageBox::Continue )
return false;
}
return true;
}