summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
authorzautrix <zautrix>2004-10-06 19:41:10 (UTC)
committer zautrix <zautrix>2004-10-06 19:41:10 (UTC)
commitbe3a5ea82c9a160eeeaad187a357c9a085fdb20a (patch) (side-by-side diff)
tree933c685c84430f5c19a0657239b5c8b50a88de05 /kaddressbook/kabcore.cpp
parent656636acfb8c607901c97c4f55129e29e1df9913 (diff)
downloadkdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.zip
kdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.tar.gz
kdepimpi-be3a5ea82c9a160eeeaad187a357c9a085fdb20a.tar.bz2
bugfixes
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.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include "kabcore.h"
#include <stdaddressbook.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <qtimer.h>
#include <qlabel.h>
+#include <qregexp.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qprogressbar.h>
#include <libkdepim/phoneaccess.h>
#ifndef KAB_EMBEDDED
#include <qclipboard.h>
#include <qdir.h>
#include <qfile.h>
#include <qapplicaton.h>
#include <qprogressbar.h>
@@ -717,24 +718,29 @@ void KABCore::export2phone()
datastream +=vcard.mid( next+5,sep -next -5 ).upper();
start = sep;
}
datastream += vcard.mid( start,vcard.length() );
}
QFile outFile(fileName);
if ( outFile.open(IO_WriteOnly) ) {
datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
QTextStream t( &outFile ); // use a text stream
t.setEncoding( QTextStream::UnicodeUTF8 );
t <<datastream;
outFile.close();
+ if ( PhoneAccess::writeToPhone( fileName ) )
+ qDebug("Export okay ");
+ else
+ qDebug("Error export contacts ");
+
} else {
qDebug("Error open temp file ");
return;
}
#if 0
setCaption( i18n("Writing to phone..."));
if ( PhoneFormat::writeToPhone( cal ) )
setCaption( i18n("Export to phone successful!"));
else