Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 18 |
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,18 +1,19 @@ | |||
1 | #include "mailtypes.h" | 1 | #include "mailtypes.h" |
2 | 2 | ||
3 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <qpe/timestring.h> | ||
4 | 5 | ||
5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
6 | 7 | ||
7 | using namespace Opie::Core; | 8 | using namespace Opie::Core; |
8 | RecMail::RecMail() | 9 | RecMail::RecMail() |
9 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) | 10 | :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7),maildate(),date("") |
10 | { | 11 | { |
11 | init(); | 12 | init(); |
12 | } | 13 | } |
13 | 14 | ||
14 | RecMail::RecMail(const RecMail&old) | 15 | RecMail::RecMail(const RecMail&old) |
15 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) | 16 | :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7),maildate(),date("") |
16 | { | 17 | { |
17 | init(); | 18 | init(); |
18 | copy_old(old); | 19 | copy_old(old); |
@@ -27,6 +28,7 @@ RecMail::~RecMail() | |||
27 | void RecMail::copy_old(const RecMail&old) | 28 | void RecMail::copy_old(const RecMail&old) |
28 | { | 29 | { |
29 | subject = old.subject; | 30 | subject = old.subject; |
31 | maildate = old.maildate; | ||
30 | date = old.date; | 32 | date = old.date; |
31 | mbox = old.mbox; | 33 | mbox = old.mbox; |
32 | msg_id = old.msg_id; | 34 | msg_id = old.msg_id; |
@@ -53,6 +55,17 @@ void RecMail::init() | |||
53 | wrapper = 0; | 55 | wrapper = 0; |
54 | } | 56 | } |
55 | 57 | ||
58 | void RecMail::setDate( const QDateTime&a,int offset) | ||
59 | { | ||
60 | QString timestring = TimeString::numberDateString(a.date())+" "; | ||
61 | timestring+=TimeString::timeString(a.time()); | ||
62 | if (offset > 0) { | ||
63 | timestring.sprintf(timestring+" %+05i",offset); | ||
64 | } | ||
65 | date = timestring; | ||
66 | maildate = a; | ||
67 | } | ||
68 | |||
56 | void RecMail::setWrapper(AbstractMail*awrapper) | 69 | void RecMail::setWrapper(AbstractMail*awrapper) |
57 | { | 70 | { |
58 | wrapper = awrapper; | 71 | wrapper = awrapper; |
@@ -396,4 +409,3 @@ folderStat&folderStat::operator=(const folderStat&old) | |||
396 | message_recent = old.message_recent; | 409 | message_recent = old.message_recent; |
397 | return *this; | 410 | return *this; |
398 | } | 411 | } |
399 | |||