summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp10
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.h10
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,12 +1,10 @@
#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;
lastPop3Stat = currentImapStat;
currentPop3Stat = currentImapStat;
@@ -16,19 +14,19 @@ 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);
current->statusFolder(currentStat);
currentImapStat.message_count+=currentStat.message_unseen;
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,26 +1,26 @@
#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 */
folderStat currentPop3Stat;
/* lastPop3Stat is the sum of messages in LAST loop */