From f7a401f03c18ef96eb40dc5540b31cd10880e845 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Fri, 20 Aug 2004 01:16:22 +0000 Subject: bugfix: fixed a memoryleak in vCards while saving contacts --- (limited to 'kabc') diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp index 0cd2086..5fca3bc 100644 --- a/kabc/vcard/VCardEntity.cpp +++ b/kabc/vcard/VCardEntity.cpp @@ -117,6 +117,13 @@ VCardEntity::cardList() VCardEntity::setCardList(const VCardList & l) { parse(); - cardList_ = l; +//US cardList_ = l; + VCardListIterator it(l); + + for (; it.current(); ++it) { + VCard* v = new VCard(*it.current()); + cardList_.append(v); + } + } diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index bd9a57b..bffaa64 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -283,8 +283,8 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCard *v, bool intern ) { - ContentLine cl; - QString value; +//US ContentLine cl; +//US QString value; addTextValue( v, EntityName, addressee.name() ); addTextValue( v, EntityUID, addressee.uid() ); -- cgit v0.9.0.2