summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp32
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 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24/* 24/*s
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
@@ -39,6 +39,7 @@ $Id$
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qprogressbar.h> 41#include <qprogressbar.h>
42#include <libkdepim/phoneaccess.h>
42 43
43#ifndef KAB_EMBEDDED 44#ifndef KAB_EMBEDDED
44#include <qclipboard.h> 45#include <qclipboard.h>
@@ -673,20 +674,20 @@ void KABCore::export2phone()
673 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 674 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
674 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 675 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
675 676
676#if 0 677
677 PhoneFormat::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 678 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
678 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 679 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
679 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 680 KPimGlobalPrefs::instance()->mEx2PhoneModel );
680 681
682 QStringList uids = mViewManager->selectedUids();
683 if ( uids.isEmpty() )
684 return;
681 685
682 686#ifdef _WIN32_
683 687 QString fileName = locateLocal("tmp", "tempfile.vcf");
684 688#else
685 QString fileName = "/tmp/kapibeamfile.vcf"; 689 QString fileName = "/tmp/kdepimtemp.vcf";
686 690#endif
687
688 //QDir().mkdir( dirName, true );
689
690 691
691 KABC::VCardConverter converter; 692 KABC::VCardConverter converter;
692 QString description; 693 QString description;
@@ -718,7 +719,6 @@ void KABCore::export2phone()
718 } 719 }
719 datastream += vcard.mid( start,vcard.length() ); 720 datastream += vcard.mid( start,vcard.length() );
720 } 721 }
721#ifndef DESKTOP_VERSION
722 QFile outFile(fileName); 722 QFile outFile(fileName);
723 if ( outFile.open(IO_WriteOnly) ) { 723 if ( outFile.open(IO_WriteOnly) ) {
724 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 724 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
@@ -726,17 +726,13 @@ void KABCore::export2phone()
726 t.setEncoding( QTextStream::UnicodeUTF8 ); 726 t.setEncoding( QTextStream::UnicodeUTF8 );
727 t <<datastream; 727 t <<datastream;
728 outFile.close(); 728 outFile.close();
729 Ir *ir = new Ir( this );
730 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
731 ir->send( fileName, description, "text/x-vCard" );
732 } else { 729 } else {
733 qDebug("Error open temp beam file "); 730 qDebug("Error open temp file ");
734 return; 731 return;
735 } 732 }
736#endif
737
738 733
739 734
735#if 0
740 736
741 setCaption( i18n("Writing to phone...")); 737 setCaption( i18n("Writing to phone..."));
742 if ( PhoneFormat::writeToPhone( cal ) ) 738 if ( PhoneFormat::writeToPhone( cal ) )