Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index c7b1eeb..1069b9f 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -1,7 +1,5 @@ #include "accountview.h" -#include "imapwrapper.h" -#include "pop3wrapper.h" #include "mailtypes.h" #include "defines.h" @@ -12,9 +10,9 @@ POP3viewItem::POP3viewItem( POP3account *a, QListView *parent ) : AccountViewItem( parent ) { account = a; - wrapper = new POP3wrapper( account ); + wrapper = AbstractMail::getWrapper( account ); setPixmap( 0, PIXMAP_POP3FOLDER ); setText( 0, account->getAccountName() ); } @@ -25,9 +23,9 @@ POP3viewItem::~POP3viewItem() void POP3viewItem::refresh( QList<RecMail> &target ) { qDebug( "POP3: refresh" ); - wrapper->listMessages( target ); + wrapper->listMessages("INBOX", target ); } RecBody POP3viewItem::fetchBody( const RecMail &mail ) @@ -43,9 +41,9 @@ RecBody POP3viewItem::fetchBody( const RecMail &mail ) IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent ) : AccountViewItem( parent ) { account = a; - wrapper = new IMAPwrapper( account ); + wrapper = AbstractMail::getWrapper( account ); setPixmap( 0, PIXMAP_IMAPFOLDER ); setText( 0, account->getAccountName() ); setOpen( true ); } @@ -54,25 +52,25 @@ IMAPviewItem::~IMAPviewItem() { delete wrapper; } -IMAPwrapper *IMAPviewItem::getWrapper() +AbstractMail *IMAPviewItem::getWrapper() { return wrapper; } void IMAPviewItem::refresh(QList<RecMail>&) { - QList<IMAPFolder> *folders = wrapper->listFolders(); + QList<Folder> *folders = wrapper->listFolders(); QListViewItem *child = firstChild(); while ( child ) { QListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } - IMAPFolder *it; + Folder *it; for ( it = folders->first(); it; it = folders->next() ) { (void) new IMAPfolderItem( it, this ); } } @@ -86,9 +84,9 @@ IMAPfolderItem::~IMAPfolderItem() { delete folder; } -IMAPfolderItem::IMAPfolderItem( IMAPFolder *folderInit, IMAPviewItem *parent ) +IMAPfolderItem::IMAPfolderItem( Folder *folderInit, IMAPviewItem *parent ) : AccountViewItem( parent ) { folder = folderInit; imap = parent; |