SVN commit 645389 by wstephens:

When deleting an account, there may be jobs live on that account that aren't automatically cleaned up. Make them 
safe in places where they lookup the account.
BUG#137302

svn path=/branches/kdepim/enterprise/kdepim/; revision=667960
wilder-work
Pradeepto Bhattacharya 19 years ago
parent 36bd498938
commit 041853362c
  1. 30
      imapjob.cpp

@ -502,6 +502,12 @@ void ImapJob::slotGetBodyStructureResult( KIO::Job * job )
void ImapJob::slotPutMessageDataReq( KIO::Job *job, QByteArray &data )
{
KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account();
if ( !account )
{
emit finished();
deleteLater();
return;
}
ImapAccountBase::JobIterator it = account->findJob( job );
if ( it == account->jobsEnd() ) return;
@ -522,6 +528,12 @@ void ImapJob::slotPutMessageDataReq( KIO::Job *job, QByteArray &data )
void ImapJob::slotPutMessageResult( KIO::Job *job )
{
KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account();
if ( !account )
{
emit finished();
deleteLater();
return;
}
ImapAccountBase::JobIterator it = account->findJob( job );
if ( it == account->jobsEnd() ) return;
bool deleteMe = false;
@ -562,6 +574,12 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data)
{
KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
KMAcctImap *account = imapFolder->account();
if ( !account )
{
emit finished();
deleteLater();
return;
}
ImapAccountBase::JobIterator it = account->findJob( job );
if ( it == account->jobsEnd() ) return;
@ -595,6 +613,12 @@ void ImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data)
{
KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
KMAcctImap *account = imapFolder->account();
if ( !account )
{
emit finished();
deleteLater();
return;
}
ImapAccountBase::JobIterator it = account->findJob( job );
if ( it == account->jobsEnd() ) return;
@ -613,6 +637,12 @@ void ImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data)
void ImapJob::slotCopyMessageResult( KIO::Job *job )
{
KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account();
if ( !account )
{
emit finished();
deleteLater();
return;
}
ImapAccountBase::JobIterator it = account->findJob( job );
if ( it == account->jobsEnd() ) return;

Loading…
Cancel
Save