From eddc5184f5be6a067b077d18e240a1fe982bbcf4 Mon Sep 17 00:00:00 2001 From: alwin Date: Mon, 08 Mar 2004 01:00:18 +0000 Subject: type of mail account will be defined by a enum not with string - comparing strings all the time makes no sense. --- (limited to 'noncore/net/mail/libmailwrapper/statusmail.cpp') 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&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(it); current = AbstractMail::getWrapper(ima); connectionList.append(current); @@ -34,7 +34,7 @@ void StatusMail::initAccounts(QList&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(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); } -- cgit v0.9.0.2