Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c0260bd3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix save all settings when we autosave

parent a221f94c
......@@ -1948,6 +1948,7 @@ void KMComposeWin::autoSaveMessage(bool force)
{
if ( isComposerModified() || force ) {
applyComposerSetting( mComposerBase );
mComposerBase->saveMailSettings();
mComposerBase->autoSaveMessage();
if ( !force ) {
mWasModified = true;
......
......@@ -228,23 +228,9 @@ void MessageComposer::ComposerViewBase::updateTemplate ( const KMime::Message::P
delete msgContent;
}
void MessageComposer::ComposerViewBase::send ( MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn, bool checkMailDispatcher )
void MessageComposer::ComposerViewBase::saveMailSettings()
{
mSendMethod = method;
mSaveIn = saveIn;
#ifndef QT_NO_CURSOR
MessageViewer::KCursorSaver busy( MessageViewer::KBusyPtr::busy() );
#endif
const KPIMIdentities::Identity identity = identityManager()->identityForUoid( m_identityCombo->currentIdentity() );
if(identity.attachVcard() && m_attachmentController->attachOwnVcard()) {
const QString vcardFileName = identity.vCardFile();
if(!vcardFileName.isEmpty()) {
m_attachmentController->addAttachmentUrlSync(KUrl(vcardFileName));
}
}
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Transport", m_msg.get(), QString::number(m_transport->currentTransportId()), "utf-8" ) );
m_msg->setHeader( new KMime::Headers::Generic( "X-KMail-Fcc", m_msg.get(), QString::number( m_fccCollection.id() ) , "utf-8" ) );
......@@ -266,6 +252,27 @@ void MessageComposer::ComposerViewBase::send ( MessageComposer::MessageSender::S
kDebug() << "Plain text";
}
}
void MessageComposer::ComposerViewBase::send ( MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn, bool checkMailDispatcher )
{
mSendMethod = method;
mSaveIn = saveIn;
#ifndef QT_NO_CURSOR
MessageViewer::KCursorSaver busy( MessageViewer::KBusyPtr::busy() );
#endif
const KPIMIdentities::Identity identity = identityManager()->identityForUoid( m_identityCombo->currentIdentity() );
if(identity.attachVcard() && m_attachmentController->attachOwnVcard()) {
const QString vcardFileName = identity.vCardFile();
if(!vcardFileName.isEmpty()) {
m_attachmentController->addAttachmentUrlSync(KUrl(vcardFileName));
}
}
saveMailSettings();
if ( m_editor->isFormattingUsed() && inlineSigningEncryptionSelected() ) {
const QString keepBtnText = m_encrypt ?
m_sign ? i18n( "&Keep markup, do not sign/encrypt" )
......
......@@ -216,6 +216,7 @@ public:
void setSendLaterInfo( SendLater::SendLaterInfo *info);
SendLater::SendLaterInfo *sendLaterInfo() const;
void saveMailSettings();
public slots:
void identityChanged( const KPIMIdentities::Identity &ident, const KPIMIdentities::Identity &oldIdent, bool msgCleared = false);
......
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