summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/ContentLine.cpp
Side-by-side diff
Diffstat (limited to 'kabc/vcard/ContentLine.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp31
1 files changed, 28 insertions, 3 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
@@ -47,71 +47,96 @@
#include <VCardNValue.h>
#include <VCardURIValue.h>
#include <VCardSoundValue.h>
#include <VCardClassValue.h>
#include <VCardFloatValue.h>
#include <VCardOrgValue.h>
#include <VCardTelValue.h>
#include <VCardTextListValue.h>
#include <VCardUTCValue.h>
#include <VCardGeoValue.h>
#include <VCardRToken.h>
#include <VCardContentLine.h>
#include <VCardEntity.h>
#include <VCardEnum.h>
#include <VCardDefines.h>
using namespace VCARD;
ContentLine::ContentLine()
: Entity(),
value_(0)
{
+ paramList_.setAutoDelete( TRUE );
}
ContentLine::ContentLine(const ContentLine & x)
: Entity(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);
+ }
+
}
ContentLine::ContentLine(const QCString & s)
: Entity(s),
value_(0)
{
+ paramList_.setAutoDelete( TRUE );
}
ContentLine &
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();
Entity::operator = (x);
return *this;
}
ContentLine &
ContentLine::operator = (const QCString & s)
{
Entity::operator = (s);
delete value_;
value_ = 0;
return *this;
}
bool
ContentLine::operator == (ContentLine & x)
{
x.parse();
QPtrListIterator<Param> it(x.paramList());
if (!paramList_.find(it.current()))
return false;