author | alwin <alwin> | 2004-03-18 18:00:18 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-18 18:00:18 (UTC) |
commit | fef9cec046fcf21a4f762c36454b8f253dd3e25e (patch) (unidiff) | |
tree | b87ee38164e1e9ce635dde34c13677f09388c058 /noncore/net/mail/libmailwrapper/mailtypes.cpp | |
parent | 69fa0e7b5cab5f4cdfdac736e31ff0fd0fbf4312 (diff) | |
download | opie-fef9cec046fcf21a4f762c36454b8f253dd3e25e.zip opie-fef9cec046fcf21a4f762c36454b8f253dd3e25e.tar.gz opie-fef9cec046fcf21a4f762c36454b8f253dd3e25e.tar.bz2 |
some (hopeful) improvements
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index fd91fe5..90b8865 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -111,12 +111,29 @@ const QStringList& RecMail::References()const | |||
111 | } | 111 | } |
112 | 112 | ||
113 | RecPart::RecPart() | 113 | RecPart::RecPart() |
114 | : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) | 114 | : Opie::Core::ORefCount(), |
115 | m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) | ||
115 | { | 116 | { |
116 | m_Parameters.clear(); | 117 | m_Parameters.clear(); |
117 | m_poslist.clear(); | 118 | m_poslist.clear(); |
118 | } | 119 | } |
119 | 120 | ||
121 | RecPart::RecPart(const RecPart&old) | ||
122 | : Opie::Core::ORefCount(), | ||
123 | m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) | ||
124 | { | ||
125 | m_type = old.m_type; | ||
126 | m_subtype = old.m_subtype; | ||
127 | m_identifier = old.m_identifier; | ||
128 | m_encoding = old.m_encoding; | ||
129 | m_description = old.m_description; | ||
130 | m_lines = old.m_lines; | ||
131 | m_size = old.m_size; | ||
132 | m_Parameters = old.m_Parameters; | ||
133 | m_poslist = old.m_poslist; | ||
134 | qDebug("RecPart copy constructor"); | ||
135 | } | ||
136 | |||
120 | RecPart::~RecPart() | 137 | RecPart::~RecPart() |
121 | { | 138 | { |
122 | } | 139 | } |
@@ -227,11 +244,20 @@ const QValueList<int>& RecPart::Positionlist()const | |||
227 | } | 244 | } |
228 | 245 | ||
229 | RecBody::RecBody() | 246 | RecBody::RecBody() |
230 | : m_BodyText(),m_PartsList(),m_description() | 247 | : Opie::Core::ORefCount(),m_BodyText(),m_description(new RecPart()) |
231 | { | 248 | { |
232 | m_PartsList.clear(); | 249 | m_PartsList.clear(); |
233 | } | 250 | } |
234 | 251 | ||
252 | RecBody::RecBody(const RecBody&old) | ||
253 | :Opie::Core::ORefCount(),m_BodyText(),m_PartsList(),m_description(new RecPart()) | ||
254 | { | ||
255 | m_BodyText = old.m_BodyText; | ||
256 | m_PartsList = old.m_PartsList; | ||
257 | m_description = old.m_description; | ||
258 | qDebug("Recbody copy constructor"); | ||
259 | } | ||
260 | |||
235 | RecBody::~RecBody() | 261 | RecBody::~RecBody() |
236 | { | 262 | { |
237 | } | 263 | } |
@@ -246,28 +272,28 @@ const QString& RecBody::Bodytext()const | |||
246 | return m_BodyText; | 272 | return m_BodyText; |
247 | } | 273 | } |
248 | 274 | ||
249 | void RecBody::setParts(const QValueList<RecPart>&parts) | 275 | void RecBody::setParts(const QValueList<RecPartP>&parts) |
250 | { | 276 | { |
251 | m_PartsList.clear(); | 277 | m_PartsList.clear(); |
252 | m_PartsList = parts; | 278 | m_PartsList = parts; |
253 | } | 279 | } |
254 | 280 | ||
255 | const QValueList<RecPart>& RecBody::Parts()const | 281 | const QValueList<RecPartP>& RecBody::Parts()const |
256 | { | 282 | { |
257 | return m_PartsList; | 283 | return m_PartsList; |
258 | } | 284 | } |
259 | 285 | ||
260 | void RecBody::addPart(const RecPart& part) | 286 | void RecBody::addPart(const RecPartP& part) |
261 | { | 287 | { |
262 | m_PartsList.append(part); | 288 | m_PartsList.append(part); |
263 | } | 289 | } |
264 | 290 | ||
265 | void RecBody::setDescription(const RecPart&des) | 291 | void RecBody::setDescription(const RecPartP&des) |
266 | { | 292 | { |
267 | m_description = des; | 293 | m_description = des; |
268 | } | 294 | } |
269 | 295 | ||
270 | const RecPart& RecBody::Description()const | 296 | const RecPartP& RecBody::Description()const |
271 | { | 297 | { |
272 | return m_description; | 298 | return m_description; |
273 | } | 299 | } |