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

Hide CMS-specific certificate categories in settings if CMS is disabled

GnuPG-bug-id: 5688
parent 4783266e
Pipeline #102660 passed with stage
in 2 minutes and 19 seconds
......@@ -449,8 +449,13 @@ void AppearanceConfigWidget::load()
const QStringList groups = config->groupList().filter(QRegularExpression(QStringLiteral("^Key Filter #\\d+$")));
for (const QString &group : groups) {
//QListWidgetItem * item = new QListWidgetItem( d->categoriesLV );
apply_config(KConfigGroup(config, group), new QListWidgetItem(d->categoriesLV));
const KConfigGroup configGroup{config, group};
const bool isCmsSpecificKeyFilter = !configGroup.readEntry("is-openpgp-key", true);
auto item = new QListWidgetItem{d->categoriesLV};
// hide CMS-specific filters if CMS is disabled; we hide those filters
// instead of skipping them, so that they are not removed on save
item->setHidden(isCmsSpecificKeyFilter && !Kleo::Settings{}.cmsEnabled());
apply_config(configGroup, item);
const TooltipPreferences prefs;
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