author | zautrix <zautrix> | 2004-10-06 16:20:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-06 16:20:25 (UTC) |
commit | 656636acfb8c607901c97c4f55129e29e1df9913 (patch) (side-by-side diff) | |
tree | 25efd61a6b691822a11f43719efcbf69ce7d5c25 /kaddressbook | |
parent | a22de800110d8350a5200a994b041e47d51bf4c6 (diff) | |
download | kdepimpi-656636acfb8c607901c97c4f55129e29e1df9913.zip kdepimpi-656636acfb8c607901c97c4f55129e29e1df9913.tar.gz kdepimpi-656636acfb8c607901c97c4f55129e29e1df9913.tar.bz2 |
more fixes
-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,18 +675,18 @@ 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; - - - - QString fileName = "/tmp/kapibeamfile.vcf"; - - - //QDir().mkdir( dirName, true ); - +#ifdef _WIN32_ + QString fileName = locateLocal("tmp", "tempfile.vcf"); +#else + QString fileName = "/tmp/kdepimtemp.vcf"; +#endif KABC::VCardConverter converter; @@ -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...")); |