-rw-r--r-- | kaddressbook/kabcore.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 185cf46..7bec90a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -22,5 +22,5 @@ */ -/* +/*s Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk @@ -40,4 +40,5 @@ $Id$ #include <qpushbutton.h> #include <qprogressbar.h> +#include <libkdepim/phoneaccess.h> #ifndef KAB_EMBEDDED @@ -674,19 +675,19 @@ void KABCore::export2phone() KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); -#if 0 - PhoneFormat::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, + + PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, KPimGlobalPrefs::instance()->mEx2PhoneConnection, KPimGlobalPrefs::instance()->mEx2PhoneModel ); + QStringList uids = mViewManager->selectedUids(); + if ( uids.isEmpty() ) + return; +#ifdef _WIN32_ + QString fileName = locateLocal("tmp", "tempfile.vcf"); +#else + QString fileName = "/tmp/kdepimtemp.vcf"; +#endif - - - QString fileName = "/tmp/kapibeamfile.vcf"; - - - //QDir().mkdir( dirName, true ); - - KABC::VCardConverter converter; QString description; @@ -719,5 +720,4 @@ void KABCore::export2phone() datastream += vcard.mid( start,vcard.length() ); } -#ifndef DESKTOP_VERSION QFile outFile(fileName); if ( outFile.open(IO_WriteOnly) ) { @@ -727,15 +727,11 @@ void KABCore::export2phone() t <<datastream; outFile.close(); - Ir *ir = new Ir( this ); - connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); - ir->send( fileName, description, "text/x-vCard" ); } else { - qDebug("Error open temp beam file "); + qDebug("Error open temp file "); return; } -#endif - +#if 0 setCaption( i18n("Writing to phone...")); |