Don't add an account to the mail checking queue, if it is alredy in it.

svn path=/trunk/kdenetwork/kmail/; revision=75577
wilder-work
Michael Haeckel 26 years ago
parent 9f25626830
commit d3ce931175
  1. 6
      kmacctmgr.cpp
  2. 3
      kmacctmgr.h

@ -29,7 +29,7 @@ KMAcctMgr::KMAcctMgr(const char* aBasePath): KMAcctMgrInherited()
mAcctList.setAutoDelete(TRUE);
setBasePath(aBasePath);
mAccountIt = new QListIterator<KMAccount>(mAcctList);
mAcctChecking = new QQueue<KMAccount>();
mAcctChecking = new QList<KMAccount>();
checking = false;
lastAccountChecked = 0;
}
@ -117,7 +117,7 @@ void KMAcctMgr::singleCheckMail(KMAccount *account, bool _interactive)
newMailArrived = false;
interactive = _interactive;
mAcctChecking->enqueue(account);
if (!mAcctChecking->contains(account)) mAcctChecking->append(account);
if (checking) {
return;
@ -168,7 +168,7 @@ void KMAcctMgr::processNextCheck(bool _newMail)
return;
}
KMAccount *curAccount = mAcctChecking->dequeue();
KMAccount *curAccount = mAcctChecking->take(0);
connect( curAccount, SIGNAL(finishedCheck(bool)),
this, SLOT(processNextCheck(bool)) );

@ -6,7 +6,6 @@
#define kmacctmgr_h
#include <qobject.h>
#include <qqueue.h>
#include <qlist.h>
#include <qstring.h>
#include <qdir.h>
@ -82,7 +81,7 @@ private:
QString mBasePath;
KMAcctList mAcctList;
QListIterator< KMAccount > *mAccountIt;
QQueue< KMAccount > *mAcctChecking;
QList< KMAccount > *mAcctChecking;
KMAccount *lastAccountChecked;
bool checking;
bool newMailArrived;

Loading…
Cancel
Save