summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp31
-rw-r--r--kabc/vcard/VCardEntity.cpp3
-rw-r--r--kabc/vcard/VCardv.cpp23
3 files changed, 51 insertions, 6 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 6fa1a8f..0fb5b5d 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -69,4 +69,5 @@ ContentLine::ContentLine()
value_(0)
{
+ paramList_.setAutoDelete( TRUE );
}
@@ -75,7 +76,22 @@ ContentLine::ContentLine(const ContentLine & x)
group_ (x.group_),
name_ (x.name_),
- paramList_(x.paramList_),
- value_(x.value_->clone())
+/*US paramList_(x.paramList_),*/
+ value_(x.value_->clone()),
+ paramType_(x.paramType_),
+ valueType_(x.valueType_),
+ entityType_(x.entityType_)
{
+ paramList_.setAutoDelete( TRUE );
+
+
+ ParamListIterator it(x.paramList_);
+ for (; it.current(); ++it)
+ {
+ Param *p = new Param;
+ p->setName( it.current()->name() );
+ p->setValue( it.current()->value() );
+ paramList_.append(p);
+ }
+
}
@@ -84,4 +100,5 @@ ContentLine::ContentLine(const QCString & s)
value_(0)
{
+ paramList_.setAutoDelete( TRUE );
}
@@ -91,5 +108,13 @@ ContentLine::operator = (ContentLine & x)
if (*this == x) return *this;
- paramList_ = x.paramList();
+ ParamListIterator it(x.paramList_);
+ for (; it.current(); ++it)
+ {
+ Param *p = new Param;
+ p->setName( it.current()->name() );
+ p->setValue( it.current()->value() );
+ paramList_.append(p);
+ }
+
value_ = x.value_->clone();
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
@@ -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 );
}
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
@@ -37,11 +37,21 @@ 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);
+ }
+
}
@@ -49,4 +59,5 @@ VCard::VCard(const QCString & s)
: Entity(s)
{
+ contentLineList_.setAutoDelete( TRUE );
}
@@ -54,8 +65,14 @@ VCard::VCard(const QCString & s)
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);