Commit 529356f4 authored by Laurent Montel's avatar Laurent Montel 😁

Don't show error message when we cancel crypto.

Fix potential crash when model is null if we forgot to set it
parent 35014824
......@@ -1971,8 +1971,10 @@ void KMComposeWin::slotSendFailed( const QString& msg,MessageComposer::ComposerV
{
// setModified( false );
setEnabled( true );
KMessageBox::sorry( mMainWidget, msg,
(type == MessageComposer::ComposerViewBase::AutoSave) ? i18n( "Autosave Message Failed" ) : i18n( "Sending Message Failed" ) );
if (!msg.isEmpty()) {
KMessageBox::sorry( mMainWidget, msg,
(type == MessageComposer::ComposerViewBase::AutoSave) ? i18n( "Autosave Message Failed" ) : i18n( "Sending Message Failed" ) );
}
}
void KMComposeWin::slotSendSuccessful(const QString &messageId)
......
......@@ -268,7 +268,7 @@ private:
void readyForSending();
enum RecipientExpansion { UseExpandedRecipients, UseUnExpandedRecipients };
QList< MessageComposer::Composer* > generateCryptoMessages();
QList< MessageComposer::Composer* > generateCryptoMessages(bool &wasCanceled);
void fillGlobalPart( MessageComposer::GlobalPart *globalPart );
void fillInfoPart( MessageComposer::InfoPart *part, RecipientExpansion expansion );
void queueMessage( KMime::Message::Ptr message, MessageComposer::Composer* composer );
......@@ -280,8 +280,8 @@ private:
void markAllAttachmentsForSigning(bool sign);
void markAllAttachmentsForEncryption(bool encrypt);
bool determineWhetherToSign(bool doSignCompletely , Kleo::KeyResolver *keyResolver, bool signSomething, bool & result);
bool determineWhetherToEncrypt(bool doEncryptCompletely , Kleo::KeyResolver *keyResolver, bool encryptSomething, bool signSomething, bool & result);
bool determineWhetherToSign(bool doSignCompletely , Kleo::KeyResolver *keyResolver, bool signSomething, bool & result, bool &canceled);
bool determineWhetherToEncrypt(bool doEncryptCompletely , Kleo::KeyResolver *keyResolver, bool encryptSomething, bool signSomething, bool & result, bool &canceled);
/**
* Writes out autosave data to the disk from the KMime::Message message.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment