summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/VCardv.cpp
Side-by-side diff
Diffstat (limited to 'kabc/vcard/VCardv.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/VCardv.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp
index 8d271f4..3f0a5e5 100644
--- a/kabc/vcard/VCardv.cpp
+++ b/kabc/vcard/VCardv.cpp
@@ -27,45 +27,62 @@
#include <VCardEntity.h>
#include <VCardVCard.h>
#include <VCardContentLine.h>
#include <VCardRToken.h>
#include <VCardDefines.h>
using namespace VCARD;
VCard::VCard()
: Entity()
{
+ contentLineList_.setAutoDelete( TRUE );
}
VCard::VCard(const VCard & x)
: Entity(x),
- group_(x.group_),
- contentLineList_(x.contentLineList_)
+ group_(x.group_)
{
+ contentLineList_.setAutoDelete( TRUE );
+ //US
+ qDebug("VCard::VCard");
+
+ QPtrListIterator<ContentLine> it(x.contentLineList_);
+ for (; it.current(); ++it) {
+ ContentLine * c = new ContentLine(*it.current());
+ contentLineList_.append(c);
+ }
+
}
VCard::VCard(const QCString & s)
: Entity(s)
{
+ contentLineList_.setAutoDelete( TRUE );
}
VCard &
VCard::operator = (VCard & x)
{
+ //US
+ qDebug("VCard::operator =");
if (*this == x) return *this;
group_ = x.group();
- contentLineList_ = x.contentLineList_;
+ QPtrListIterator<ContentLine> it(x.contentLineList_);
+ for (; it.current(); ++it) {
+ ContentLine * c = new ContentLine(*it.current());
+ contentLineList_.append(c);
+ }
Entity::operator = (x);
return *this;
}
VCard &
VCard::operator = (const QCString & s)
{
Entity::operator = (s);
return *this;
}