summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/statusmail.cpp
authoralwin <alwin>2004-03-08 01:00:18 (UTC)
committer alwin <alwin>2004-03-08 01:00:18 (UTC)
commiteddc5184f5be6a067b077d18e240a1fe982bbcf4 (patch) (side-by-side diff)
tree0d9458a10520ca23e1d5d041d9d2ca4150bd8f1c /noncore/net/mail/libmailwrapper/statusmail.cpp
parenteedafdf1a1d973c083cb108a913005d14a78a9ae (diff)
downloadopie-eddc5184f5be6a067b077d18e240a1fe982bbcf4.zip
opie-eddc5184f5be6a067b077d18e240a1fe982bbcf4.tar.gz
opie-eddc5184f5be6a067b077d18e240a1fe982bbcf4.tar.bz2
type of mail account will be defined by a enum not with string - comparing
strings all the time makes no sense.
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);
}