diff --git a/imapjob.cpp b/imapjob.cpp index 27408fc3c..664d1e9d2 100644 --- a/imapjob.cpp +++ b/imapjob.cpp @@ -639,10 +639,15 @@ void ImapJob::expireMessages() void ImapJob::slotProcessedSize(KIO::Job * job, KIO::filesize_t processed) { KMMessage *msg = mMsgList.first(); - if (!msg || !msg->parent() || !job) { + if (!msg || !job) { return; } - KMFolderImap* parent = static_cast(msg->parent()->storage()); + KMFolderImap* parent = 0; + if (msg->parent()) + parent = static_cast(msg->parent()->storage()); + else if (mDestFolder) // put + parent = static_cast(mDestFolder->storage()); + if (!parent) return; KMAcctImap *account = parent->account(); if ( !account ) return; ImapAccountBase::JobIterator it = account->findJob( job ); diff --git a/kmfolderimap.cpp b/kmfolderimap.cpp index f6568be53..2a4592c86 100644 --- a/kmfolderimap.cpp +++ b/kmfolderimap.cpp @@ -371,6 +371,8 @@ int KMFolderImap::addMsg(QPtrList& msgList, int* aIndex_ret) imapJob = new ImapJob(msg, ImapJob::tPutMessage, this); connect(imapJob, SIGNAL(messageStored(KMMessage*)), SLOT(addMsgQuiet(KMMessage*))); + connect( imapJob, SIGNAL( progress(unsigned long, unsigned long) ), + mAccount, SLOT( displayProgress() ) ); imapJob->start(); } @@ -430,6 +432,8 @@ int KMFolderImap::addMsg(QPtrList& msgList, int* aIndex_ret) imapJob = new ImapJob(msg, ImapJob::tPutMessage, this); connect(imapJob, SIGNAL(messageStored(KMMessage*)), SLOT(addMsgQuiet(KMMessage*))); + connect( imapJob, SIGNAL( progress(unsigned long, unsigned long) ), + mAccount, SLOT( displayProgress() ) ); imapJob->start(); }