summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/VCardv.cpp
Unidiff
Diffstat (limited to 'kabc/vcard/VCardv.cpp') (more/less context) (show 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
@@ -33,33 +33,50 @@
33 33
34using namespace VCARD; 34using namespace VCARD;
35 35
36VCard::VCard() 36VCard::VCard()
37 :Entity() 37 :Entity()
38{ 38{
39 contentLineList_.setAutoDelete( TRUE );
39} 40}
40 41
41VCard::VCard(const VCard & x) 42VCard::VCard(const VCard & x)
42 :Entity(x), 43 :Entity(x),
43 group_(x.group_), 44 group_(x.group_)
44 contentLineList_(x.contentLineList_)
45{ 45{
46 contentLineList_.setAutoDelete( TRUE );
47 //US
48 qDebug("VCard::VCard");
49
50 QPtrListIterator<ContentLine> it(x.contentLineList_);
51 for (; it.current(); ++it) {
52 ContentLine * c = new ContentLine(*it.current());
53 contentLineList_.append(c);
54 }
55
46} 56}
47 57
48VCard::VCard(const QCString & s) 58VCard::VCard(const QCString & s)
49 :Entity(s) 59 :Entity(s)
50{ 60{
61 contentLineList_.setAutoDelete( TRUE );
51} 62}
52 63
53 VCard & 64 VCard &
54VCard::operator = (VCard & x) 65VCard::operator = (VCard & x)
55{ 66{
67 //US
68 qDebug("VCard::operator =");
56 if (*this == x) return *this; 69 if (*this == x) return *this;
57 70
58 group_ = x.group(); 71 group_ = x.group();
59 contentLineList_= x.contentLineList_; 72 QPtrListIterator<ContentLine> it(x.contentLineList_);
73 for (; it.current(); ++it) {
74 ContentLine * c = new ContentLine(*it.current());
75 contentLineList_.append(c);
76 }
60 77
61 Entity::operator = (x); 78 Entity::operator = (x);
62 return *this; 79 return *this;
63} 80}
64 81
65 VCard & 82 VCard &