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
libkleo
Commits
2f5147f3
Commit
2f5147f3
authored
May 26, 2021
by
Ingo Klöcker
Browse files
Do not include the default key if it has the wrong protocol
This fixes a regression introduced with
5de2f7ac
.
parent
19e82d3d
Pipeline
#63163
passed with stage
in 6 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ui/keyselectioncombo.cpp
View file @
2f5147f3
...
...
@@ -362,8 +362,17 @@ public:
// Fallback to unknown protocol
defaultKey
=
defaultKeys
.
value
(
GpgME
::
UnknownProtocol
);
}
// make sure that the default key is not filtered out
sortFilterProxy
->
setAlwaysAcceptedKey
(
defaultKey
);
// make sure that the default key is not filtered out unless it has the wrong protocol
if
(
filterProto
==
GpgME
::
UnknownProtocol
)
{
sortFilterProxy
->
setAlwaysAcceptedKey
(
defaultKey
);
}
else
{
const
auto
key
=
KeyCache
::
instance
()
->
findByFingerprint
(
defaultKey
.
toLatin1
().
constData
());
if
(
!
key
.
isNull
()
&&
key
.
protocol
()
==
filterProto
)
{
sortFilterProxy
->
setAlwaysAcceptedKey
(
defaultKey
);
}
else
{
sortFilterProxy
->
setAlwaysAcceptedKey
({});
}
}
q
->
setCurrentKey
(
defaultKey
);
}
...
...
Write
Preview
Markdown
is supported
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