summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 7bec90a..b014cba 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -26,24 +26,25 @@ Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include "kabcore.h" 31#include "kabcore.h"
32 32
33#include <stdaddressbook.h> 33#include <stdaddressbook.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kfiledialog.h> 35#include <kfiledialog.h>
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qlabel.h> 37#include <qlabel.h>
38#include <qregexp.h>
38#include <qlineedit.h> 39#include <qlineedit.h>
39#include <qcheckbox.h> 40#include <qcheckbox.h>
40#include <qpushbutton.h> 41#include <qpushbutton.h>
41#include <qprogressbar.h> 42#include <qprogressbar.h>
42#include <libkdepim/phoneaccess.h> 43#include <libkdepim/phoneaccess.h>
43 44
44#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
45#include <qclipboard.h> 46#include <qclipboard.h>
46#include <qdir.h> 47#include <qdir.h>
47#include <qfile.h> 48#include <qfile.h>
48#include <qapplicaton.h> 49#include <qapplicaton.h>
49#include <qprogressbar.h> 50#include <qprogressbar.h>
@@ -717,24 +718,29 @@ void KABCore::export2phone()
717 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 718 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
718 start = sep; 719 start = sep;
719 } 720 }
720 datastream += vcard.mid( start,vcard.length() ); 721 datastream += vcard.mid( start,vcard.length() );
721 } 722 }
722 QFile outFile(fileName); 723 QFile outFile(fileName);
723 if ( outFile.open(IO_WriteOnly) ) { 724 if ( outFile.open(IO_WriteOnly) ) {
724 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 725 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
725 QTextStream t( &outFile ); // use a text stream 726 QTextStream t( &outFile ); // use a text stream
726 t.setEncoding( QTextStream::UnicodeUTF8 ); 727 t.setEncoding( QTextStream::UnicodeUTF8 );
727 t <<datastream; 728 t <<datastream;
728 outFile.close(); 729 outFile.close();
730 if ( PhoneAccess::writeToPhone( fileName ) )
731 qDebug("Export okay ");
732 else
733 qDebug("Error export contacts ");
734
729 } else { 735 } else {
730 qDebug("Error open temp file "); 736 qDebug("Error open temp file ");
731 return; 737 return;
732 } 738 }
733 739
734 740
735#if 0 741#if 0
736 742
737 setCaption( i18n("Writing to phone...")); 743 setCaption( i18n("Writing to phone..."));
738 if ( PhoneFormat::writeToPhone( cal ) ) 744 if ( PhoneFormat::writeToPhone( cal ) )
739 setCaption( i18n("Export to phone successful!")); 745 setCaption( i18n("Export to phone successful!"));
740 else 746 else