Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/statusmail.cpp | 10 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/statusmail.h | 10 |
2 files changed, 9 insertions, 11 deletions
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index 3e1d8d1..9f4c47c 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp @@ -1,10 +1,8 @@ #include "statusmail.h" -#include "mailtypes.h" -#include "abstractmail.h" #include <qlist.h> -StatusMail::StatusMail(QList<Account>*list) +StatusMail::StatusMail(QList<Account>&list) { currentImapStat.message_count=0; currentImapStat.message_unseen=0; currentImapStat.message_recent=0; @@ -18,15 +16,15 @@ StatusMail::StatusMail(QList<Account>*list) StatusMail::~StatusMail() { } -void StatusMail::initAccounts(QList<Account>*accounts) +void StatusMail::initAccounts(QList<Account>&accounts) { - if (!accounts) return; + Account *it; folderStat currentStat; AbstractMail * current = 0; - for ( it = accounts->first(); it; it = accounts->next() ) { + for ( it = accounts.first(); it; it = accounts.next() ) { if ( it->getType().compare( "IMAP" ) == 0 ) { IMAPaccount*ima = static_cast<IMAPaccount *>(it); current = AbstractMail::getWrapper(ima); connectionList.append(current); diff --git a/noncore/net/mail/libmailwrapper/statusmail.h b/noncore/net/mail/libmailwrapper/statusmail.h index 498f7a3..2637232 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.h +++ b/noncore/net/mail/libmailwrapper/statusmail.h @@ -1,24 +1,24 @@ #ifndef __MAIL_STATUS_H #define __MAIL_STATUS_H -#include <settings.h> -#include <abstractmail.h> -#include <mailtypes.h> +#include "settings.h" +#include "abstractmail.h" +#include "mailtypes.h" class StatusMail { public: - StatusMail(QList<Account>*list); + StatusMail(QList<Account>&list); virtual ~StatusMail(); /* this should be called if opiemail is starte or a mailbox touched - may be trough a qcop signal or if tab on the taskbar applet*/ virtual void reset_status(); virtual void check_current_stat(folderStat&targetStat); protected: - void initAccounts(QList<Account>*list); + void initAccounts(QList<Account>&accounts); /* this must be cause we have to calculate the recent for pop3*/ folderStat currentImapStat; /* currentPop3Stat is the sum of messages in POP3 accounts in CURRENT loop the recent are calculated to the difference of the LAST loop */ |