Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 9f2c9e3..f9e5794 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -1,18 +1,48 @@ #include "mailtypes.h" RecMail::RecMail() - :subject(""),date(""),mbox(""),msg_number(0),msg_flags(7) + :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) { + init(); +} + +RecMail::RecMail(const RecMail&old) + :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) +{ + init(); + copy_old(old); + qDebug("Copy constructor RecMail"); +} + +void RecMail::copy_old(const RecMail&old) +{ + subject = old.subject; + date = old.date; + mbox = old.mbox; + msg_id = old.msg_id; + msg_number = old.msg_number; + from = old.from; + msg_flags = old.msg_flags; + to = old.to; + cc = old.cc; + bcc = old.bcc; +} + +void RecMail::init() +{ + to.clear(); + cc.clear(); + bcc.clear(); } void RecMail::setTo(const QStringList&list) { to = list; } const QStringList&RecMail::To()const { return to; } @@ -27,25 +57,24 @@ const QStringList&RecMail::CC()const } void RecMail::setBcc(const QStringList&list) { bcc = list; } const QStringList& RecMail::Bcc()const { return bcc; } - RecPart::RecPart() : m_type(""),m_subtype(""),m_identifier(""),m_encoding("") { } RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding) : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding) { } RecPart::~RecPart() { |