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

Allow enabling/disabling group support in the key cache

GnuPG-bug-id: 5175
parent 837f48ec
......@@ -359,8 +359,10 @@ public:
// so no need for a job.
m_groups.clear();
readGroupsFromGpgConf();
readGroupsFromGroupsConfig();
if (m_groupsEnabled) {
readGroupsFromGpgConf();
readGroupsFromGroupsConfig();
}
}
bool insert(const KeyGroup &group)
......@@ -468,6 +470,7 @@ private:
bool m_initalized;
bool m_pgpOnly;
bool m_remarks_enabled;
bool m_groupsEnabled = false;
QString m_groupsConfigName;
std::vector<KeyGroup> m_groups;
};
......@@ -497,6 +500,14 @@ KeyCache::KeyCache()
KeyCache::~KeyCache() {}
void KeyCache::setGroupsEnabled(bool enabled)
{
d->m_groupsEnabled = enabled;
if (d->m_initalized) {
d->updateGroupCache();
}
}
void KeyCache::setGroupsConfig(const QString &filename)
{
d->m_groupsConfigName = filename;
......
......@@ -54,6 +54,7 @@ public:
~KeyCache();
void setGroupsEnabled(bool enabled);
void setGroupsConfig(const QString &filename);
void insert(const GpgME::Key &key);
......
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