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
03bdbbec
Commit
03bdbbec
authored
Apr 20, 2021
by
Ingo Klöcker
Browse files
Allow filling the key cache with test keys
GnuPG-bug-id: 5283
parent
29d9d7ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/keycache.cpp
View file @
03bdbbec
...
...
@@ -1741,6 +1741,17 @@ std::vector<Key> KeyCache::getGroupKeys(const QString &groupName) const
return
result
;
}
void
KeyCache
::
setKeys
(
const
std
::
vector
<
GpgME
::
Key
>&
keys
)
{
// disable regular key listing and cancel running key listing
setRefreshInterval
(
0
);
cancelKeyListing
();
clear
();
insert
(
keys
);
d
->
m_initalized
=
true
;
Q_EMIT
keyListingDone
(
KeyListResult
());
}
#include "moc_keycache_p.cpp"
#include "moc_keycache.cpp"
src/models/keycache.h
View file @
03bdbbec
...
...
@@ -152,6 +152,9 @@ public:
/** Check if all keys have OpenPGP Protocol. */
bool
pgpOnly
()
const
;
/** Set the keys the cache shall contain. Marks cache as initialized. Use for tests only. */
void
setKeys
(
const
std
::
vector
<
GpgME
::
Key
>
&
keys
);
public
Q_SLOTS
:
void
clear
();
void
startKeyListing
(
GpgME
::
Protocol
proto
=
GpgME
::
UnknownProtocol
)
...
...
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