summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/statusmail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/statusmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/statusmail.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp
index 4134e79..b78244d 100644
--- a/noncore/net/mail/libmailwrapper/statusmail.cpp
+++ b/noncore/net/mail/libmailwrapper/statusmail.cpp
@@ -23,21 +23,21 @@ void StatusMail::initAccounts(QList<Account>&accounts)
23 folderStat currentStat; 23 folderStat currentStat;
24 AbstractMail * current = 0; 24 AbstractMail * current = 0;
25 currentPop3Stat.message_count=0; 25 currentPop3Stat.message_count=0;
26 currentPop3Stat.message_recent=0; 26 currentPop3Stat.message_recent=0;
27 currentPop3Stat.message_unseen=0; 27 currentPop3Stat.message_unseen=0;
28 for ( it = accounts.first(); it; it = accounts.next() ) { 28 for ( it = accounts.first(); it; it = accounts.next() ) {
29 if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) { 29 if ( it->getType()==MAILLIB::A_IMAP && !it->getOffline() ) {
30 IMAPaccount*ima = static_cast<IMAPaccount *>(it); 30 IMAPaccount*ima = static_cast<IMAPaccount *>(it);
31 current = AbstractMail::getWrapper(ima); 31 current = AbstractMail::getWrapper(ima);
32 connectionList.append(current); 32 connectionList.append(current);
33 current->statusFolder(currentStat); 33 current->statusFolder(currentStat);
34 currentImapStat.message_count+=currentStat.message_unseen; 34 currentImapStat.message_count+=currentStat.message_unseen;
35 currentImapStat.message_count+=currentStat.message_recent; 35 currentImapStat.message_count+=currentStat.message_recent;
36 currentImapStat.message_count+=currentStat.message_count; 36 currentImapStat.message_count+=currentStat.message_count;
37 } else if ( it->getType().compare( "POP3" ) == 0 && !it->getOffline() ) { 37 } else if ( it->getType() == MAILLIB::A_POP3 && !it->getOffline() ) {
38 POP3account *pop3 = static_cast<POP3account *>(it); 38 POP3account *pop3 = static_cast<POP3account *>(it);
39 current = AbstractMail::getWrapper(pop3); 39 current = AbstractMail::getWrapper(pop3);
40 connectionList.append(current); 40 connectionList.append(current);
41 current->statusFolder(currentStat); 41 current->statusFolder(currentStat);
42 currentPop3Stat.message_count+=currentStat.message_count; 42 currentPop3Stat.message_count+=currentStat.message_count;
43 } 43 }
@@ -63,17 +63,17 @@ void StatusMail::check_current_stat(folderStat&targetStat)
63 currentPop3Stat.message_count = 0; 63 currentPop3Stat.message_count = 0;
64 currentPop3Stat.message_unseen = 0; 64 currentPop3Stat.message_unseen = 0;
65 currentImapStat = currentPop3Stat; 65 currentImapStat = currentPop3Stat;
66 for ( it = connectionList.first(); it; it = connectionList.next() ) { 66 for ( it = connectionList.first(); it; it = connectionList.next() ) {
67 it->statusFolder(currentStat); 67 it->statusFolder(currentStat);
68 it->logout(); 68 it->logout();
69 if (it->getType().lower()=="imap") { 69 if (it->getType() == MAILLIB::A_IMAP) {
70 currentImapStat.message_unseen+=currentStat.message_unseen; 70 currentImapStat.message_unseen+=currentStat.message_unseen;
71 currentImapStat.message_recent+=currentStat.message_recent; 71 currentImapStat.message_recent+=currentStat.message_recent;
72 currentImapStat.message_count+=currentStat.message_count; 72 currentImapStat.message_count+=currentStat.message_count;
73 } else if (it->getType().lower()=="pop3") { 73 } else if (it->getType() == MAILLIB::A_POP3) {
74 currentPop3Stat.message_count+=currentStat.message_count; 74 currentPop3Stat.message_count+=currentStat.message_count;
75 qDebug("Pop3 count: %i",currentPop3Stat.message_count); 75 qDebug("Pop3 count: %i",currentPop3Stat.message_count);
76 } 76 }
77 } 77 }
78 qDebug("Pop3 last: %i",lastPop3Stat.message_count); 78 qDebug("Pop3 last: %i",lastPop3Stat.message_count);
79 if (currentPop3Stat.message_count > lastPop3Stat.message_count) { 79 if (currentPop3Stat.message_count > lastPop3Stat.message_count) {