summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2005-01-06 00:18:02 (UTC)
committer zautrix <zautrix>2005-01-06 00:18:02 (UTC)
commit5e7c3e3e51fa939e97b73e6443089edcec8dc663 (patch) (side-by-side diff)
tree213be239777ec911d364f736f9e6cef1f62a7c68 /kabc
parent0618fbee69bfde7f7f3c4a54b5cc45dac446abd3 (diff)
downloadkdepimpi-5e7c3e3e51fa939e97b73e6443089edcec8dc663.zip
kdepimpi-5e7c3e3e51fa939e97b73e6443089edcec8dc663.tar.gz
kdepimpi-5e7c3e3e51fa939e97b73e6443089edcec8dc663.tar.bz2
kapi pic fix
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardformatimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index c31af46..b9fe6ff 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -102,49 +102,49 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file )
VCardList vcardlist;
vcardlist.setAutoDelete( true );
VCard *v = new VCard;
saveAddressee( addressee, v, false );
vcardlist.append( v );
vcards.setCardList( vcardlist );
QCString vcardData = vcards.asString();
file->writeBlock( (const char*)vcardData, vcardData.length() );
}
void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file )
{
VCardEntity vcards;
VCardList vcardlist;
vcardlist.setAutoDelete( true );
AddressBook::Iterator it;
for ( it = ab->begin(); it != ab->end(); ++it ) {
if ( (*it).resource() == resource ) {
VCard *v = new VCard;
- saveAddressee( (*it), v, false );
+ saveAddressee( (*it), v, true );
(*it).setChanged( false );
vcardlist.append( v );
}
}
vcards.setCardList( vcardlist );
QCString vcardData = vcards.asString();
file->writeBlock( (const char*)vcardData, vcardData.length() );
}
bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
{
QPtrList<ContentLine> contentLines = v->contentLineList();
ContentLine *cl;
for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
QCString n = cl->name();
if ( n.left( 2 ) == "X-" ) {
n = n.mid( 2 );
int posDash = n.find( "-" );
addressee.insertCustom( QString::fromUtf8( n.left( posDash ) ),
QString::fromUtf8( n.mid( posDash + 1 ) ),
QString::fromUtf8( cl->value()->asString() ) );