Commit 03bdbbec authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Allow filling the key cache with test keys

GnuPG-bug-id: 5283
parent 29d9d7ee
......@@ -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
d->m_initalized = true;
Q_EMIT keyListingDone(KeyListResult());
#include "moc_keycache_p.cpp"
#include "moc_keycache.cpp"
......@@ -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)
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