summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (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
@@ -70,2 +70,3 @@ ContentLine::ContentLine()
{
+ paramList_.setAutoDelete( TRUE );
}
@@ -76,5 +77,20 @@ ContentLine::ContentLine(const ContentLine & x)
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);
+ }
+
}
@@ -85,2 +101,3 @@ ContentLine::ContentLine(const QCString & s)
{
+ paramList_.setAutoDelete( TRUE );
}
@@ -92,3 +109,11 @@ ContentLine::operator = (ContentLine & x)
- 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
@@ -33,2 +33,3 @@ VCardEntity::VCardEntity()
{
+ cardList_.setAutoDelete( TRUE );
}
@@ -38,2 +39,3 @@ VCardEntity::VCardEntity(const VCardEntity & x)
{
+ cardList_.setAutoDelete( TRUE );
}
@@ -43,2 +45,3 @@ VCardEntity::VCardEntity(const QCString & 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
@@ -38,2 +38,3 @@ VCard::VCard()
{
+ contentLineList_.setAutoDelete( TRUE );
}
@@ -42,5 +43,14 @@ 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);
+ }
+
}
@@ -50,2 +60,3 @@ VCard::VCard(const QCString & s)
{
+ contentLineList_.setAutoDelete( TRUE );
}
@@ -55,2 +66,4 @@ VCard::operator = (VCard & x)
{
+ //US
+ qDebug("VCard::operator =");
if (*this == x) return *this;
@@ -58,3 +71,7 @@ VCard::operator = (VCard & x)
group_ = x.group();
- contentLineList_ = x.contentLineList_;
+ QPtrListIterator<ContentLine> it(x.contentLineList_);
+ for (; it.current(); ++it) {
+ ContentLine * c = new ContentLine(*it.current());
+ contentLineList_.append(c);
+ }