author | alwin <alwin> | 2004-10-25 22:34:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-25 22:34:15 (UTC) |
commit | 9e97864f04686ca8fc672de950cbbef4ff6a5ec6 (patch) (side-by-side diff) | |
tree | 7aa5b07b4bb6fce77844d7883d947100a1ae3759 | |
parent | d29de6d360b0570c12778beea9f654a8fcdbe3c7 (diff) | |
download | opie-9e97864f04686ca8fc672de950cbbef4ff6a5ec6.zip opie-9e97864f04686ca8fc672de950cbbef4ff6a5ec6.tar.gz opie-9e97864f04686ca8fc672de950cbbef4ff6a5ec6.tar.bz2 |
fixed the problem with displaying date/time of a mail
usage of helper class
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 18 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 3 |
2 files changed, 5 insertions, 16 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index fe75a15..56efa0b 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -11,5 +11,5 @@ using namespace Opie::Core; IMAPwrapper::IMAPwrapper( IMAPaccount *a ) - : AbstractMail() + : AbstractMail(),MailStatics() { account = a; @@ -425,7 +425,6 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { mailimap_envelope * head = item->att_data.att_static->att_data.att_env; - m->setDate(head->env_date); + m->setDate(parseDateTime(head->env_date)); m->setSubject(convert_String((const char*)head->env_subject)); - //m->setSubject(head->env_subject); if (head->env_from!=NULL) { addresslist = address_list_to_stringlist(head->env_from->frm_list); @@ -469,16 +468,5 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) } } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { -#if 0 - mailimap_date_time*date = item->att_data.att_static->att_data.att_internal_date; - if (date->dt_sec>60 || date->dt_sec<0) date->dt_sec=0; - //QDateTime da(QDate(d->dt_year,date->dt_month,date->dt_day),QTime(date->dt_hour,date->dt_min,date->dt_sec)); - QString timestring = TimeString::numberDateString(QDate(date->dt_year,date->dt_month,date->dt_day))+" "; - timestring+=TimeString::timeString(QTime(date->dt_hour,date->dt_min,date->dt_sec))+" "; - timestring.sprintf(timestring+" %+05i",date->dt_zone); - m->setDate(timestring); - QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); - odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; - odebug << da.toString() << oendl; -#endif + // not used this moment } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { //size = item->att_data.att_static->att_data.att_rfc822_size; diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index e56605a..5efcfc9 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h @@ -5,4 +5,5 @@ #include "mailwrapper.h" #include "abstractmail.h" +#include "mailstatics.h" #include <libetpan/clist.h> @@ -18,5 +19,5 @@ struct mailimap_msg_att; class encodedString; -class IMAPwrapper : public AbstractMail +class IMAPwrapper : public AbstractMail,public MailStatics { Q_OBJECT |