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
d0a44035
Commit
d0a44035
authored
Mar 03, 2021
by
Ingo Klöcker
Browse files
Allow enabling/disabling group support in the key cache
GnuPG-bug-id: 5175
parent
837f48ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/keycache.cpp
View file @
d0a44035
...
...
@@ -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
;
...
...
src/models/keycache.h
View file @
d0a44035
...
...
@@ -54,6 +54,7 @@ public:
~
KeyCache
();
void
setGroupsEnabled
(
bool
enabled
);
void
setGroupsConfig
(
const
QString
&
filename
);
void
insert
(
const
GpgME
::
Key
&
key
);
...
...
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