Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
5a364af7
Commit
5a364af7
authored
Sep 29, 2021
by
Sandro Knauß
🐝
Browse files
Adopt messagelib DraftCryptoState.
parent
3e10b397
Pipeline
#83616
failed with stage
in 1 minute and 46 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
agents/sendlateragent/sendlaterjob.cpp
View file @
5a364af7
...
...
@@ -7,6 +7,7 @@
#include
"sendlaterjob.h"
#include
<MessageComposer/AkonadiSender>
#include
<MessageComposer/DraftStatus>
#include
<MessageComposer/SendLaterInfo>
#include
<MessageComposer/Util>
#include
<MessageCore/StringUtil>
...
...
@@ -112,7 +113,7 @@ void SendLaterJob::slotJobFinished(KJob *job)
void
SendLaterJob
::
updateAndCleanMessageBeforeSending
(
const
KMime
::
Message
::
Ptr
&
msg
)
{
msg
->
date
()
->
setDateTime
(
QDateTime
::
currentDateTime
());
MessageComposer
::
Util
::
removeNotNecessary
Headers
(
msg
);
MessageComposer
::
removeDraftCrypto
Headers
(
msg
);
msg
->
assemble
();
}
...
...
src/editor/kmcomposerwin.cpp
View file @
5a364af7
...
...
@@ -96,6 +96,7 @@
#include
<MessageComposer/ComposerLineEdit>
#include
<MessageComposer/ComposerViewInterface>
#include
<MessageComposer/ConvertSnippetVariablesJob>
#include
<MessageComposer/DraftStatus>
#include
<MessageComposer/FollowUpReminderSelectDateDialog>
#include
<MessageComposer/FollowupReminder>
#include
<MessageComposer/FollowupReminderCreateJob>
...
...
@@ -1812,14 +1813,17 @@ void KMComposerWin::setMessage(const KMime::Message::Ptr &newMsg,
addFaceHeaders
(
ident
,
mMsg
);
// if these headers are present, the state of the message should be overruled
if
(
auto
hdr
=
mMsg
->
headerByType
(
"X-KMail-SignatureActionEnabled"
))
{
mLastSignActionState
=
(
hdr
->
as7BitString
(
false
).
contains
(
"true"
));
MessageComposer
::
DraftSignatureState
signState
(
mMsg
);
if
(
signState
.
isDefined
())
{
mLastSignActionState
=
signState
.
signState
();
}
if
(
auto
hdr
=
mMsg
->
headerByType
(
"X-KMail-EncryptActionEnabled"
))
{
mLastEncryptActionState
=
(
hdr
->
as7BitString
(
false
).
contains
(
"true"
));
MessageComposer
::
DraftEncryptionState
encState
(
mMsg
);
if
(
encState
.
isDefined
())
{
mLastEncryptActionState
=
encState
.
encryptionState
();
}
if
(
auto
hdr
=
mMsg
->
headerByType
(
"X-KMail-CryptoMessageFormat"
))
{
mCryptoModuleAction
->
setCurrentItem
(
format2cb
(
static_cast
<
Kleo
::
CryptoMessageFormat
>
(
hdr
->
asUnicodeString
().
toInt
())));
MessageComposer
::
DraftCryptoMessageFormatState
formatState
(
mMsg
);
if
(
formatState
.
isDefined
())
{
mCryptoModuleAction
->
setCurrentItem
(
format2cb
(
formatState
.
cryptoMessageFormatState
()));
}
mLastIdentityHasSigningKey
=
!
ident
.
pgpSigningKey
().
isEmpty
()
||
!
ident
.
smimeSigningKey
().
isEmpty
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment