summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/statusmail.cpp
Side-by-side diff
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
@@ -26,7 +26,7 @@ void StatusMail::initAccounts(QList<Account>&accounts)
currentPop3Stat.message_recent=0;
currentPop3Stat.message_unseen=0;
for ( it = accounts.first(); it; it = accounts.next() ) {
- if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) {
+ if ( it->getType()==MAILLIB::A_IMAP && !it->getOffline() ) {
IMAPaccount*ima = static_cast<IMAPaccount *>(it);
current = AbstractMail::getWrapper(ima);
connectionList.append(current);
@@ -34,7 +34,7 @@ void StatusMail::initAccounts(QList<Account>&accounts)
currentImapStat.message_count+=currentStat.message_unseen;
currentImapStat.message_count+=currentStat.message_recent;
currentImapStat.message_count+=currentStat.message_count;
- } else if ( it->getType().compare( "POP3" ) == 0 && !it->getOffline() ) {
+ } else if ( it->getType() == MAILLIB::A_POP3 && !it->getOffline() ) {
POP3account *pop3 = static_cast<POP3account *>(it);
current = AbstractMail::getWrapper(pop3);
connectionList.append(current);
@@ -66,11 +66,11 @@ void StatusMail::check_current_stat(folderStat&targetStat)
for ( it = connectionList.first(); it; it = connectionList.next() ) {
it->statusFolder(currentStat);
it->logout();
- if (it->getType().lower()=="imap") {
+ if (it->getType() == MAILLIB::A_IMAP) {
currentImapStat.message_unseen+=currentStat.message_unseen;
currentImapStat.message_recent+=currentStat.message_recent;
currentImapStat.message_count+=currentStat.message_count;
- } else if (it->getType().lower()=="pop3") {
+ } else if (it->getType() == MAILLIB::A_POP3) {
currentPop3Stat.message_count+=currentStat.message_count;
qDebug("Pop3 count: %i",currentPop3Stat.message_count);
}