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 @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -/* +/*s Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk @@ -39,6 +39,7 @@ $Id$ #include <qcheckbox.h> #include <qpushbutton.h> #include <qprogressbar.h> +#include <libkdepim/phoneaccess.h> #ifndef KAB_EMBEDDED #include <qclipboard.h> @@ -673,21 +674,21 @@ void KABCore::export2phone() KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 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; QString datastream; @@ -718,7 +719,6 @@ void KABCore::export2phone() } datastream += vcard.mid( start,vcard.length() ); } -#ifndef DESKTOP_VERSION QFile outFile(fileName); if ( outFile.open(IO_WriteOnly) ) { datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); @@ -726,17 +726,13 @@ void KABCore::export2phone() t.setEncoding( QTextStream::UnicodeUTF8 ); 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...")); if ( PhoneFormat::writeToPhone( cal ) ) |