Diffstat (limited to 'noncore/net/mail/libmailwrapper/statusmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/statusmail.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index b78244d..51383f6 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp | |||
@@ -34,25 +34,25 @@ void StatusMail::initAccounts(QList<Account>&accounts) | |||
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() == MAILLIB::A_POP3 && !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 | } |
44 | current->logout(); | 44 | current->logout(); |
45 | } | 45 | } |
46 | qDebug("Pop3 init count: %i",currentPop3Stat.message_count); | 46 | odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl; |
47 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; | 47 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; |
48 | lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; | 48 | lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; |
49 | lastPop3Stat.message_recent = currentPop3Stat.message_recent; | 49 | lastPop3Stat.message_recent = currentPop3Stat.message_recent; |
50 | lastPop3Stat.message_count = currentPop3Stat.message_count; | 50 | lastPop3Stat.message_count = currentPop3Stat.message_count; |
51 | } | 51 | } |
52 | 52 | ||
53 | void StatusMail::reset_status() | 53 | void StatusMail::reset_status() |
54 | { | 54 | { |
55 | lastPop3Stat = currentPop3Stat; | 55 | lastPop3Stat = currentPop3Stat; |
56 | } | 56 | } |
57 | 57 | ||
58 | void StatusMail::check_current_stat(folderStat&targetStat) | 58 | void StatusMail::check_current_stat(folderStat&targetStat) |
@@ -63,28 +63,28 @@ 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() == MAILLIB::A_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() == MAILLIB::A_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 | odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl; |
76 | } | 76 | } |
77 | } | 77 | } |
78 | qDebug("Pop3 last: %i",lastPop3Stat.message_count); | 78 | odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl; |
79 | if (currentPop3Stat.message_count > lastPop3Stat.message_count) { | 79 | if (currentPop3Stat.message_count > lastPop3Stat.message_count) { |
80 | currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; | 80 | currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; |
81 | currentPop3Stat.message_unseen = currentPop3Stat.message_recent; | 81 | currentPop3Stat.message_unseen = currentPop3Stat.message_recent; |
82 | } else { | 82 | } else { |
83 | lastPop3Stat.message_count = currentPop3Stat.message_count; | 83 | lastPop3Stat.message_count = currentPop3Stat.message_count; |
84 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; | 84 | currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; |
85 | } | 85 | } |
86 | targetStat = currentImapStat; | 86 | targetStat = currentImapStat; |
87 | targetStat.message_unseen+=currentPop3Stat.message_unseen; | 87 | targetStat.message_unseen+=currentPop3Stat.message_unseen; |
88 | targetStat.message_recent+=currentPop3Stat.message_recent; | 88 | targetStat.message_recent+=currentPop3Stat.message_recent; |
89 | targetStat.message_count+=currentPop3Stat.message_count; | 89 | targetStat.message_count+=currentPop3Stat.message_count; |
90 | } | 90 | } |