summaryrefslogtreecommitdiff
path: root/noncore/net/mail/accountview.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index 662e555..0fe8475 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -54,45 +54,40 @@ void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int)
54} 54}
55 55
56void AccountView::populate( QList<Account> list ) 56void AccountView::populate( QList<Account> list )
57{ 57{
58 clear(); 58 clear();
59 59
60 imapAccounts.clear(); 60 imapAccounts.clear();
61 mhAccounts.clear(); 61 mhAccounts.clear();
62 62
63 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); 63 mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this));
64 64
65 Account *it; 65 Account *it;
66 for ( it = list.first(); it; it = list.next() ) 66 for ( it = list.first(); it; it = list.next() ) {
67 { 67 if ( it->getType() == MAILLIB::A_IMAP ) {
68 if ( it->getType() == MAILLIB::A_IMAP )
69 {
70 IMAPaccount *imap = static_cast<IMAPaccount *>(it); 68 IMAPaccount *imap = static_cast<IMAPaccount *>(it);
71 odebug << "added IMAP " + imap->getAccountName() << oendl; 69 odebug << "added IMAP " + imap->getAccountName() << oendl;
72 imapAccounts.append(new IMAPviewItem( imap, this )); 70 imapAccounts.append(new IMAPviewItem( imap, this ));
73 } 71 } else if ( it->getType() == MAILLIB::A_POP3 ) {
74 else if ( it->getType() == MAILLIB::A_POP3 )
75 {
76 POP3account *pop3 = static_cast<POP3account *>(it); 72 POP3account *pop3 = static_cast<POP3account *>(it);
77 odebug << "added POP3 " + pop3->getAccountName() << oendl; 73 odebug << "added POP3 " + pop3->getAccountName() << oendl;
78 /* must not be hold 'cause it isn't required */ 74 /* must not be hold 'cause it isn't required */
79 (void) new POP3viewItem( pop3, this ); 75 (void) new POP3viewItem( pop3, this );
80 } 76 } else if ( it->getType() == MAILLIB::A_NNTP ) {
81 else if ( it->getType() == MAILLIB::A_NNTP )
82 {
83 NNTPaccount *nntp = static_cast<NNTPaccount *>(it); 77 NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
84 odebug << "added NNTP " + nntp->getAccountName() << oendl; 78 odebug << "added NNTP " + nntp->getAccountName() << oendl;
85 /* must not be hold 'cause it isn't required */ 79 /* must not be hold 'cause it isn't required */
86 (void) new NNTPviewItem( nntp, this ); 80 (void) new NNTPviewItem( nntp, this );
81 } else if ( it->getType() == MAILLIB::A_MH ) {
87 } 82 }
88 } 83 }
89} 84}
90 85
91void AccountView::refresh(QListViewItem *item) 86void AccountView::refresh(QListViewItem *item)
92{ 87{
93 88
94 odebug << "AccountView refresh..." << oendl; 89 odebug << "AccountView refresh..." << oendl;
95 if ( item ) 90 if ( item )
96 { 91 {
97 m_currentItem = item; 92 m_currentItem = item;
98 QValueList<RecMailP> headerlist; 93 QValueList<RecMailP> headerlist;