author | alwin <alwin> | 2004-03-18 18:00:18 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-18 18:00:18 (UTC) |
commit | fef9cec046fcf21a4f762c36454b8f253dd3e25e (patch) (side-by-side diff) | |
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) (show 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 } RecPart::RecPart() - : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) + : Opie::Core::ORefCount(), + m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) { m_Parameters.clear(); m_poslist.clear(); } +RecPart::RecPart(const RecPart&old) + : Opie::Core::ORefCount(), + m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_description(""),m_lines(0),m_size(0) +{ + m_type = old.m_type; + m_subtype = old.m_subtype; + m_identifier = old.m_identifier; + m_encoding = old.m_encoding; + m_description = old.m_description; + m_lines = old.m_lines; + m_size = old.m_size; + m_Parameters = old.m_Parameters; + m_poslist = old.m_poslist; + qDebug("RecPart copy constructor"); +} + RecPart::~RecPart() { } @@ -227,11 +244,20 @@ const QValueList<int>& RecPart::Positionlist()const } RecBody::RecBody() - : m_BodyText(),m_PartsList(),m_description() + : Opie::Core::ORefCount(),m_BodyText(),m_description(new RecPart()) { m_PartsList.clear(); } +RecBody::RecBody(const RecBody&old) + :Opie::Core::ORefCount(),m_BodyText(),m_PartsList(),m_description(new RecPart()) +{ + m_BodyText = old.m_BodyText; + m_PartsList = old.m_PartsList; + m_description = old.m_description; + qDebug("Recbody copy constructor"); +} + RecBody::~RecBody() { } @@ -246,28 +272,28 @@ const QString& RecBody::Bodytext()const return m_BodyText; } -void RecBody::setParts(const QValueList<RecPart>&parts) +void RecBody::setParts(const QValueList<RecPartP>&parts) { m_PartsList.clear(); m_PartsList = parts; } -const QValueList<RecPart>& RecBody::Parts()const +const QValueList<RecPartP>& RecBody::Parts()const { return m_PartsList; } -void RecBody::addPart(const RecPart& part) +void RecBody::addPart(const RecPartP& part) { m_PartsList.append(part); } -void RecBody::setDescription(const RecPart&des) +void RecBody::setDescription(const RecPartP&des) { m_description = des; } -const RecPart& RecBody::Description()const +const RecPartP& RecBody::Description()const { return m_description; } |