summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-12 23:42:08 (UTC)
committer zautrix <zautrix>2005-11-12 23:42:08 (UTC)
commit4145dc4a513d5899d8a2b9e4573d8140d871b386 (patch) (unidiff)
tree11bb2010757a65d90c2ed7e4d40d4e72d218eeb9
parent9e47202fd38512cc523c09cf8878f4c5d836e777 (diff)
downloadkdepimpi-4145dc4a513d5899d8a2b9e4573d8140d871b386.zip
kdepimpi-4145dc4a513d5899d8a2b9e4573d8140d871b386.tar.gz
kdepimpi-4145dc4a513d5899d8a2b9e4573d8140d871b386.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardformatimpl.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index 26fd4f0..580c28b 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -855,2 +855,3 @@ Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl )
855 855
856#include <qstringlist.h>
856void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern ) 857void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType type, const Picture &pic, const Addressee &addr, bool intern )
@@ -859,3 +860,3 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
859 cl.setName( EntityTypeToParamName( type ) ); 860 cl.setName( EntityTypeToParamName( type ) );
860 861 // qDebug( "IIIMMMMM %s",QImage::outputFormatList ().join("-").latin1() );
861 if ( pic.isIntern() && pic.data().isNull() ) 862 if ( pic.isIntern() && pic.data().isNull() )
@@ -875,3 +876,5 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
875 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); 876 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
876 877 params.append( new Param( "ENCODING", "b" ) );
878 if ( !pic.type().isEmpty() )
879 params.append( new Param( "TYPE", pic.type().utf8() ) );
877 } else { // save picture in cache 880 } else { // save picture in cache
@@ -882,9 +885,10 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
882 dir = "logos"; 885 dir = "logos";
883 886 QString imUrl = locateLocal( "data", "kabc/" + dir + "/" + addr.uid() );
884 img.save( locateLocal( "data", "kabc/" + dir + "/" + addr.uid() ), pic.type().utf8() ); 887 KABC::Picture* ppic =(KABC::Picture*) &pic;
885 cl.setValue( new TextValue( "<dummy>" ) ); 888 ppic->setUrl( imUrl );
889 img.save(imUrl, "PNG" );
890 cl.setValue( new TextValue( pic.url().utf8() ) );
891 params.append( new Param( "VALUE", "uri" ) );
886 } 892 }
887 params.append( new Param( "ENCODING", "b" ) ); 893
888 if ( !pic.type().isEmpty() )
889 params.append( new Param( "TYPE", pic.type().utf8() ) );
890 } else { 894 } else {