Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 1bde886..df9fc11 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -1,8 +1,9 @@ #include "accountview.h" #include "imapwrapper.h" +#include "mailtypes.h" #include "defines.h" IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent ) : AccountViewItem( parent ) { account = a; @@ -19,13 +20,13 @@ IMAPviewItem::~IMAPviewItem() IMAPwrapper *IMAPviewItem::getWrapper() { return wrapper; } -void IMAPviewItem::refresh(Maillist&) +void IMAPviewItem::refresh(QList<RecMail>&) { QList<IMAPFolder> *folders = wrapper->listFolders(); QListViewItem *child = firstChild(); while ( child ) { QListViewItem *tmp = child; @@ -36,12 +37,16 @@ void IMAPviewItem::refresh(Maillist&) IMAPFolder *it; for ( it = folders->first(); it; it = folders->next() ) { (void) new IMAPfolderItem( it, this ); } } +RecBody IMAPviewItem::fetchBody(const RecMail&) +{ + return RecBody(); +} IMAPfolderItem::~IMAPfolderItem() { delete folder; } @@ -51,18 +56,18 @@ IMAPfolderItem::IMAPfolderItem( IMAPFolder *folderInit, IMAPviewItem *parent ) folder = folderInit; imap = parent; setPixmap( 0, PIXMAP_IMAPFOLDER ); setText( 0, folder->getDisplayName() ); } -void IMAPfolderItem::refresh(Maillist&target) +void IMAPfolderItem::refresh(QList<RecMail>&target) { imap->getWrapper()->listMessages( folder->getName(),target ); } -QString IMAPfolderItem::fetchBody(const RecMail&aMail) +RecBody IMAPfolderItem::fetchBody(const RecMail&aMail) { return imap->getWrapper()->fetchBody(aMail); } AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) : QListView( parent, name, flags ) @@ -85,27 +90,26 @@ void AccountView::populate( QList<Account> list ) } } void AccountView::refresh(QListViewItem *item) { qDebug("AccountView refresh..."); if ( item ) { - Maillist headerlist; + QList<RecMail> headerlist; headerlist.setAutoDelete(true); AccountViewItem *view = static_cast<AccountViewItem *>(item); view->refresh(headerlist); emit refreshMailview(&headerlist); } } void AccountView::refreshAll() { } -QString AccountView::fetchBody(const RecMail&aMail) +RecBody AccountView::fetchBody(const RecMail&aMail) { - QString Body; QListViewItem*item = selectedItem (); - if (!item) return Body; + if (!item) return RecBody(); AccountViewItem *view = static_cast<AccountViewItem *>(item); return view->fetchBody(aMail); } |