-rw-r--r-- | kabc/vcard/VCardv.cpp | 23 |
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 @@ | |||
27 | #include <VCardEntity.h> | 27 | #include <VCardEntity.h> |
28 | #include <VCardVCard.h> | 28 | #include <VCardVCard.h> |
29 | #include <VCardContentLine.h> | 29 | #include <VCardContentLine.h> |
30 | #include <VCardRToken.h> | 30 | #include <VCardRToken.h> |
31 | 31 | ||
32 | #include <VCardDefines.h> | 32 | #include <VCardDefines.h> |
33 | 33 | ||
34 | using namespace VCARD; | 34 | using namespace VCARD; |
35 | 35 | ||
36 | VCard::VCard() | 36 | VCard::VCard() |
37 | :Entity() | 37 | :Entity() |
38 | { | 38 | { |
39 | contentLineList_.setAutoDelete( TRUE ); | ||
39 | } | 40 | } |
40 | 41 | ||
41 | VCard::VCard(const VCard & x) | 42 | VCard::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 | ||
48 | VCard::VCard(const QCString & s) | 58 | VCard::VCard(const QCString & s) |
49 | :Entity(s) | 59 | :Entity(s) |
50 | { | 60 | { |
61 | contentLineList_.setAutoDelete( TRUE ); | ||
51 | } | 62 | } |
52 | 63 | ||
53 | VCard & | 64 | VCard & |
54 | VCard::operator = (VCard & x) | 65 | VCard::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 & |
66 | VCard::operator = (const QCString & s) | 83 | VCard::operator = (const QCString & s) |
67 | { | 84 | { |
68 | Entity::operator = (s); | 85 | Entity::operator = (s); |
69 | return *this; | 86 | return *this; |
70 | } | 87 | } |
71 | 88 | ||