summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp18
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.h3
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
@@ -7,13 +7,13 @@
#include "imapwrapper.h"
#include "mailtypes.h"
#include "logindialog.h"
using namespace Opie::Core;
IMAPwrapper::IMAPwrapper( IMAPaccount *a )
- : AbstractMail()
+ : AbstractMail(),MailStatics()
{
account = a;
m_imap = 0;
m_Lastmbox = "";
}
@@ -421,15 +421,14 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
}
}
continue;
}
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);
if (addresslist.count()) {
m->setFrom(addresslist.first());
}
}
@@ -465,24 +464,13 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
}
}
if (head->env_message_id) {
m->setMsgid(QString(head->env_message_id));
}
} 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;
m->setMsgsize(item->att_data.att_static->att_data.att_rfc822_size);
}
}
/* msg is already deleted */
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
@@ -1,12 +1,13 @@
#ifndef __IMAPWRAPPER
#define __IMAPWRAPPER
#include <qlist.h>
#include "mailwrapper.h"
#include "abstractmail.h"
+#include "mailstatics.h"
#include <libetpan/clist.h>
struct mailimap;
struct mailimap_body;
struct mailimap_body_type_1part;
struct mailimap_body_type_text;
@@ -14,13 +15,13 @@ struct mailimap_body_type_basic;
struct mailimap_body_type_msg;
struct mailimap_body_type_mpart;
struct mailimap_body_fields;
struct mailimap_msg_att;
class encodedString;
-class IMAPwrapper : public AbstractMail
+class IMAPwrapper : public AbstractMail,public MailStatics
{
Q_OBJECT
public:
IMAPwrapper( IMAPaccount *a );
virtual ~IMAPwrapper();
virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();