[Bug 113580] Crash on closing compose-window which is prompting for passphrase
Will Stephenson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kmail |
|---|---|
| Message-ID | <[email protected]> |
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=113580
wstephenson kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From wstephenson kde org 2007-03-22 17:39 -------
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/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #645445:645446
@ -2055,6 +2055,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/KDE/3.5/kdepim/kmail/messagecomposer.cpp #645445:645446
@ -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/KDE/3.5/kdepim/kmail/messagecomposer.h #645445:645446
@ -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 */