[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:54:54
Message-ID: 1180022094.355136.14080.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 667962 by pradeepto:

Merge ...
SVN commit 645446 by wstephens:

Disallow closing the composer window whilst performing a sign operation, this causes \
a crash when using the  non-gpg-agent PGP backend.
BUG#113580


 M  +2 -0      kmcomposewin.cpp  
 M  +4 -3      messagecomposer.cpp  
 M  +2 -0      messagecomposer.h  


--- branches/kdepim/enterprise/kdepim/kmail/kmcomposewin.cpp #667961:667962
@@ -2062,6 +2062,8 @@
     return false;
   if ( kmkernel->shuttingDown() || kapp->sessionSaving() )
     return true;
+  if ( mComposer && mComposer->isPerformingSignOperation() ) // since the \
non-gpg-agent gpg plugin gets a passphrase using QDialog::exec() +    return false;   \
// the user can try to close the window, which destroys mComposer mid-call.  
   if ( isModified() ) {
     bool istemplate = ( mFolder!=0 && mFolder->isTemplates() );
--- branches/kdepim/enterprise/kdepim/kmail/messagecomposer.cpp #667961:667962
@@ -287,7 +287,7 @@
 
 MessageComposer::MessageComposer( KMComposeWin* win, const char* name )
   : QObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ),
-    mKeyResolver( 0 ), mIdentityUid( 0 )
+    mKeyResolver( 0 ), mIdentityUid( 0 ), mPerformingSignOperation( false )
 {
 }
 
@@ -1590,9 +1590,10 @@
   }
 
   if ( doSignBody ) {
-
+    mPerformingSignOperation = true;  // this lets the KMComposeWin know if it is \
safe to close the window.  pgpSignedMsg( mEncodedBody, format );
-
+    mPerformingSignOperation = false;
+    
     if ( mSignature.isEmpty() ) {
       kdDebug() << "signature was empty" << endl;
       mRc = false;
--- branches/kdepim/enterprise/kdepim/kmail/messagecomposer.h #667961:667962
@@ -92,6 +92,7 @@
     return mMessageList;
   }
 
+  bool isPerformingSignOperation() const { return mPerformingSignOperation; }
 signals:
   void done( bool );
 
@@ -273,6 +274,7 @@
 
   QValueList<MessageComposerJob*> mJobs;
   bool mEncryptWithChiasmus;
+  bool mPerformingSignOperation;
 };
 
 #endif /* MESSAGECOMPOSER_H */


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

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