summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 47ed858..dae9cd2 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -804,43 +804,45 @@ void KABCore::beamVCard(const QStringList& uids)
804 sep = dopp; 804 sep = dopp;
805 datastream +=vcard.mid( start, next - start); 805 datastream +=vcard.mid( start, next - start);
806 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 806 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
807 start = sep; 807 start = sep;
808 } 808 }
809 datastream += vcard.mid( start,vcard.length() ); 809 datastream += vcard.mid( start,vcard.length() );
810 } 810 }
811#ifndef DESKTOP_VERSION 811#ifndef DESKTOP_VERSION
812 QFile outFile(fileName); 812 QFile outFile(fileName);
813 if ( outFile.open(IO_WriteOnly) ) { 813 if ( outFile.open(IO_WriteOnly) ) {
814 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 814 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
815 QTextStream t( &outFile ); // use a text stream 815 QTextStream t( &outFile ); // use a text stream
816 t.setEncoding( QTextStream::UnicodeUTF8 ); 816 //t.setEncoding( QTextStream::UnicodeUTF8 );
817 t <<datastream; 817 t.setEncoding( QTextStream::Latin1 );
818 t <<datastream.latin1();
818 outFile.close(); 819 outFile.close();
819 Ir *ir = new Ir( this ); 820 Ir *ir = new Ir( this );
820 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 821 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
821 ir->send( fileName, description, "text/x-vCard" ); 822 ir->send( fileName, description, "text/x-vCard" );
822 } else { 823 } else {
823 qDebug("Error open temp beam file "); 824 qDebug("Error open temp beam file ");
824 return; 825 return;
825 } 826 }
826#endif 827#endif
827 828
828} 829}
829 830
830void KABCore::beamDone( Ir *ir ) 831void KABCore::beamDone( Ir *ir )
831{ 832{
832#ifndef DESKTOP_VERSION 833#ifndef DESKTOP_VERSION
833 delete ir; 834 delete ir;
834#endif 835#endif
836 topLevelWidget()->raise();
835} 837}
836 838
837 839
838void KABCore::browse( const QString& url ) 840void KABCore::browse( const QString& url )
839{ 841{
840#ifndef KAB_EMBEDDED 842#ifndef KAB_EMBEDDED
841 kapp->invokeBrowser( url ); 843 kapp->invokeBrowser( url );
842#else //KAB_EMBEDDED 844#else //KAB_EMBEDDED
843 qDebug("KABCore::browse must be fixed"); 845 qDebug("KABCore::browse must be fixed");
844#endif //KAB_EMBEDDED 846#endif //KAB_EMBEDDED
845} 847}
846 848