[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/kdepim/enterprise/kdepim/kmail
From:       Pradeepto Bhattacharya <pradeepto () kde ! org>
Date:       2007-05-24 15:44:15
Message-ID: 1180021455.498405.13023.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 667960 by pradeepto:

Merge ...
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


 M  +30 -0     imapjob.cpp  


--- branches/kdepim/enterprise/kdepim/kmail/imapjob.cpp #667959:667960
@@ -502,6 +502,12 @@
 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::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 @@
 {
   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 @@
 {
   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::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;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic