-rw-r--r-- | kabc/vcard/VCardEntity.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp index 0c21e2f..0cd2086 100644 --- a/kabc/vcard/VCardEntity.cpp +++ b/kabc/vcard/VCardEntity.cpp @@ -3,5 +3,5 @@ Copyright (C) 1998 Rik Hemsley rik@kde.org - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -32,4 +32,5 @@ VCardEntity::VCardEntity() : Entity() { + cardList_.setAutoDelete( TRUE ); } @@ -37,4 +38,5 @@ VCardEntity::VCardEntity(const VCardEntity & x) : Entity(x) { + cardList_.setAutoDelete( TRUE ); } @@ -42,4 +44,5 @@ VCardEntity::VCardEntity(const QCString & s) : Entity(s) { + cardList_.setAutoDelete( TRUE ); } @@ -76,19 +79,19 @@ VCardEntity::_parse() vDebug("parse"); QCString s(strRep_); - + int i = s.find(QRegExp("BEGIN:VCARD", false)); - + while (i != -1) { - + i = s.find(QRegExp("BEGIN:VCARD", false), 11); - + QCString cardStr(s.left(i)); - + VCard * v = new VCard(cardStr); - + cardList_.append(v); - + v->parse(); - + s.remove(0, i); } @@ -99,5 +102,5 @@ VCardEntity::_assemble() { VCardListIterator it(cardList_); - + for (; it.current(); ++it) strRep_ += it.current()->asString() + "\r\n"; // One CRLF for luck. |