author | zautrix <zautrix> | 2004-10-06 16:20:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-06 16:20:25 (UTC) |
commit | 656636acfb8c607901c97c4f55129e29e1df9913 (patch) (unidiff) | |
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 @@ | |||
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 |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (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,21 +674,21 @@ 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 | ||
686 | #ifdef _WIN32_ | ||
687 | QString fileName = locateLocal("tmp", "tempfile.vcf"); | ||
688 | #else | ||
689 | QString fileName = "/tmp/kdepimtemp.vcf"; | ||
690 | #endif | ||
682 | 691 | ||
683 | |||
684 | |||
685 | QString fileName = "/tmp/kapibeamfile.vcf"; | ||
686 | |||
687 | |||
688 | //QDir().mkdir( dirName, true ); | ||
689 | |||
690 | |||
691 | KABC::VCardConverter converter; | 692 | KABC::VCardConverter converter; |
692 | QString description; | 693 | QString description; |
693 | QString datastream; | 694 | QString datastream; |
@@ -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 ) ) |