summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/mailtypes.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp18
1 files changed, 15 insertions, 3 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
@@ -1,21 +1,22 @@
#include "mailtypes.h"
#include <opie2/odebug.h>
+#include <qpe/timestring.h>
#include <stdlib.h>
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();
}
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;
}
@@ -24,12 +25,13 @@ RecMail::~RecMail()
wrapper = 0;
}
void RecMail::copy_old(const RecMail&old)
{
subject = old.subject;
+ maildate = old.maildate;
date = old.date;
mbox = old.mbox;
msg_id = old.msg_id;
msg_size = old.msg_size;
msg_number = old.msg_number;
from = old.from;
@@ -50,12 +52,23 @@ void RecMail::init()
bcc.clear();
in_reply_to.clear();
references.clear();
wrapper = 0;
}
+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)
{
wrapper = awrapper;
}
AbstractMail* RecMail::Wrapper()
@@ -393,7 +406,6 @@ folderStat&folderStat::operator=(const folderStat&old)
{
message_count = old.message_count;
message_unseen = old.message_unseen;
message_recent = old.message_recent;
return *this;
}
-