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
Kleopatra
Commits
e54ed508
Commit
e54ed508
authored
Aug 23, 2021
by
Ingo Klöcker
Browse files
Modernize code
GnuPG-bug-id: 5535
parent
b2e7699a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/crypto/gui/signencryptfileswizard.cpp
View file @
e54ed508
...
...
@@ -237,17 +237,13 @@ public:
return
true
;
}
if
(
!
mWidget
->
selfKey
().
isNull
())
{
if
(
!
mWidget
->
selfKey
().
isNull
()
||
mWidget
->
encryptSymmetric
()
)
{
return
true
;
}
bool
hasSecret
=
false
;
Q_FOREACH
(
const
Key
k
,
mWidget
->
recipients
())
{
if
(
k
.
hasSecret
())
{
hasSecret
=
true
;
break
;
}
}
if
(
!
hasSecret
&&
!
mWidget
->
encryptSymmetric
())
{
const
auto
recipientKeys
=
recipients
();
const
bool
hasSecret
=
std
::
any_of
(
std
::
begin
(
recipientKeys
),
std
::
end
(
recipientKeys
),
[](
const
auto
&
k
)
{
return
k
.
hasSecret
();
});
if
(
!
hasSecret
)
{
if
(
KMessageBox
::
warningContinueCancel
(
this
,
xi18nc
(
"@info"
,
"<para>None of the recipients you are encrypting to seems to be your own.</para>"
...
...
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