From 656636acfb8c607901c97c4f55129e29e1df9913 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 06 Oct 2004 16:20:25 +0000 Subject: more fixes --- (limited to 'kaddressbook') 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 #include #include +#include #ifndef KAB_EMBEDDED #include @@ -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 <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 ) ) -- cgit v0.9.0.2