Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index d4395a2..b009b75 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -2,4 +2,5 @@ #include <opie2/odebug.h> +#include <qpe/timestring.h> #include <stdlib.h> @@ -7,5 +8,5 @@ using namespace Opie::Core; RecMail::RecMail() - :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) + :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7),maildate(),date("") { init(); @@ -13,9 +14,9 @@ RecMail::RecMail() RecMail::RecMail(const RecMail&old) - :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) + :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7),maildate(),date("") { init(); copy_old(old); - odebug << "Copy constructor RecMail" << oendl; + odebug << "Copy constructor RecMail" << oendl; } @@ -28,4 +29,5 @@ void RecMail::copy_old(const RecMail&old) { subject = old.subject; + maildate = old.maildate; date = old.date; mbox = old.mbox; @@ -54,4 +56,15 @@ void RecMail::init() } +void RecMail::setDate( const QDateTime&a,int offset) +{ + QString timestring = TimeString::numberDateString(a.date())+" "; + timestring+=TimeString::timeString(a.time()); + if (offset > 0) { + timestring.sprintf(timestring+" %+05i",offset); + } + date = timestring; + maildate = a; +} + void RecMail::setWrapper(AbstractMail*awrapper) { @@ -135,5 +148,5 @@ RecPart::RecPart(const RecPart&old) m_Parameters = old.m_Parameters; m_poslist = old.m_poslist; - odebug << "RecPart copy constructor" << oendl; + odebug << "RecPart copy constructor" << oendl; } @@ -259,5 +272,5 @@ RecBody::RecBody(const RecBody&old) m_PartsList = old.m_PartsList; m_description = old.m_description; - odebug << "Recbody copy constructor" << oendl; + odebug << "Recbody copy constructor" << oendl; } @@ -324,5 +337,5 @@ encodedString::encodedString(const encodedString&old) init(); copy_old(old); - odebug << "encodedeString: copy constructor!" << oendl; + odebug << "encodedeString: copy constructor!" << oendl; } @@ -331,5 +344,5 @@ encodedString& encodedString::operator=(const encodedString&old) init(); copy_old(old); - odebug << "encodedString: assign operator!" << oendl; + odebug << "encodedString: assign operator!" << oendl; return *this; } @@ -397,3 +410,2 @@ folderStat&folderStat::operator=(const folderStat&old) return *this; } - |