diff --git a/kmacctimap.cpp b/kmacctimap.cpp index 87bd5c824..999ab99dc 100644 --- a/kmacctimap.cpp +++ b/kmacctimap.cpp @@ -442,6 +442,20 @@ void KMAcctImap::killJobsForItem(KMFolderTreeItem * fti) } +//----------------------------------------------------------------------------- +void KMAcctImap::slotSimpleResult(KIO::Job * job) +{ + QMap::Iterator it = mapJobData.find(job); + if (it != mapJobData.end()) mapJobData.remove(it); + if (job->error()) + { + job->showErrorDialog(); + if (job->error() == KIO::ERR_SLAVE_DIED) mSlave = NULL; + } + displayProgress(); +} + + //============================================================================= // // Class KMImapPasswdDialog diff --git a/kmacctimap.h b/kmacctimap.h index 41b21ce0c..645851c43 100644 --- a/kmacctimap.h +++ b/kmacctimap.h @@ -217,6 +217,11 @@ protected slots: */ void slotAbortRequested(); + /** + * Only delete information about the job + */ + void slotSimpleResult(KIO::Job * job); + /** * Display an error message, that connecting failed */ diff --git a/kmfolderimap.cpp b/kmfolderimap.cpp index 8b852a084..22219c124 100644 --- a/kmfolderimap.cpp +++ b/kmfolderimap.cpp @@ -47,7 +47,6 @@ KMFolderImap::KMFolderImap(KMFolderDir* aParent, const QString& aName) : KMFolderImapInherited(aParent, aName) { - setAutoCreateIndex(false); } KMFolderImap::~KMFolderImap() @@ -455,7 +454,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) jd2.total = 0; mAccount->mapJobData.insert(newJob, jd2); connect(newJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotSimpleResult(KIO::Job *))); + mAccount, SLOT(slotSimpleResult(KIO::Job *))); connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &))); uids = ""; @@ -879,7 +878,7 @@ void KMFolderImap::deleteMessage(KMMessage * msg) jd.total = 1; jd.done = 0; jd.parent = NULL; mAccount->mapJobData.insert(job, jd); connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotSimpleResult(KIO::Job *))); + mAccount, SLOT(slotSimpleResult(KIO::Job *))); mAccount->displayProgress(); } @@ -923,7 +922,7 @@ void KMFolderImap::setStatus(KMMessage * msg, KMMsgStatus status) jd.total = 1; jd.done = 0; jd.parent = NULL; mAccount->mapJobData.insert(job, jd); connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotSimpleResult(KIO::Job *))); + mAccount, SLOT(slotSimpleResult(KIO::Job *))); mAccount->displayProgress(); } @@ -942,22 +941,7 @@ void KMFolderImap::expungeFolder(KMFolderImap * aFolder) jd.total = 1; jd.done = 0; mAccount->mapJobData.insert(job, jd); connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotSimpleResult(KIO::Job *))); - mAccount->displayProgress(); -} - - -//----------------------------------------------------------------------------- -void KMFolderImap::slotSimpleResult(KIO::Job * job) -{ - QMap::Iterator it = - mAccount->mapJobData.find(job); - if (it != mAccount->mapJobData.end()) mAccount->mapJobData.remove(it); - if (job->error()) - { - job->showErrorDialog(); - if (job->error() == KIO::ERR_SLAVE_DIED) mAccount->slaveDied(); - } + mAccount, SLOT(slotSimpleResult(KIO::Job *))); mAccount->displayProgress(); } diff --git a/kmfolderimap.h b/kmfolderimap.h index aa21dc41a..e98db74ae 100644 --- a/kmfolderimap.h +++ b/kmfolderimap.h @@ -25,7 +25,7 @@ #define kmfolderimap_h #include "kmacctimap.h" -#include "kmfoldermaildir.h" +#include "kmfoldermbox.h" #include "kmmsgbase.h" #include "kio/job.h" @@ -33,7 +33,6 @@ class KMFolderTreeItem; class KMFolderImap; -class KMFolderMaildir; class KMImapJob : public QObject { @@ -66,9 +65,9 @@ private: int mTotal, mDone, mOffset; }; -#define KMFolderImapInherited KMFolderMaildir +#define KMFolderImapInherited KMFolderMbox -class KMFolderImap : public KMFolderMaildir +class KMFolderImap : public KMFolderMbox { Q_OBJECT friend class KMImapJob; @@ -237,11 +236,6 @@ protected slots: */ void slotCreateFolderResult(KIO::Job * job); - /** - * Only delete information about the job - */ - void slotSimpleResult(KIO::Job * job); - /** * Only delete information about the job and ignore write errors */