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

Add setters for name and keys to KeyGroup

Note: No setters for id and source, because both shouldn't change
during the life-time of a KeyGroup.

GnuPG-bug-id: 5175, 5239
parent b0672209
......@@ -77,11 +77,32 @@ KeyGroup::Id KeyGroup::id() const
return d ? d->id : nullId;
}
void KeyGroup::setName(const QString &name)
{
if (d) {
d->name = name;
}
}
QString KeyGroup::name() const
{
return d ? d->name : QString();
}
void KeyGroup::setKeys(const KeyGroup::Keys &keys)
{
if (d) {
d->keys = keys;
}
}
void KeyGroup::setKeys(const std::vector<GpgME::Key> &keys)
{
if (d) {
d->keys = Keys(keys.cbegin(), keys.cend());
}
}
const KeyGroup::Keys &KeyGroup::keys() const
{
static const Keys empty;
......
......@@ -56,9 +56,14 @@ public:
bool isNull() const;
Id id() const;
Source source() const;
void setName(const QString &name);
QString name() const;
void setKeys(const Keys &keys);
void setKeys(const std::vector<GpgME::Key> &keys);
const Keys &keys() const;
Source source() const;
void setConfigName(const QString &configName);
QString configName() const;
......
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