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

Enable/disable group support in key cache depending on the setting

SignEncryptWidget:
* Remove the now obsolete checks for group support

GnuPG-bug-id: 5175
parent ba9d373c
Pipeline #52936 passed with stage
in 17 minutes and 41 seconds
......@@ -15,7 +15,7 @@ option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
# Standalone build. Find / include everything necessary.
set(KF5_MIN_VERSION "5.79.0")
set(KMIME_VERSION "5.16.40")
set(LIBKLEO_VERSION "5.16.51")
set(LIBKLEO_VERSION "5.16.52")
set(QT_REQUIRED_VERSION "5.14.0")
set(GPGME_REQUIRED_VERSION "1.13.1")
......
......@@ -101,11 +101,7 @@ SignEncryptWidget::SignEncryptWidget(QWidget *parent, bool sigEncExclusive)
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setContentsMargins(0, 0, 0, 0);
if (Settings().groupsEnabled()) {
mModel->useKeyCache(true, KeyList::IncludeGroups);
} else {
mModel->useKeyCache(true, KeyList::AllKeys);
}
mModel->useKeyCache(true, KeyList::IncludeGroups);
/* The signature selection */
QHBoxLayout *sigLay = new QHBoxLayout;
......@@ -287,11 +283,7 @@ void SignEncryptWidget::dialogRequested(CertificateLineEdit *certificateLineEdit
CertificateSelectionDialog *const dlg = new CertificateSelectionDialog(this);
dlg->setKeyFilter(std::make_shared<EncryptCertificateFilter>(mCurrentProto));
if (Settings().groupsEnabled()) {
dlg->setOptions(dlg->options() | CertificateSelectionDialog::MultiSelection | CertificateSelectionDialog::IncludeGroups);
} else {
dlg->setOptions(dlg->options() | CertificateSelectionDialog::MultiSelection);
}
dlg->setOptions(dlg->options() | CertificateSelectionDialog::MultiSelection | CertificateSelectionDialog::IncludeGroups);
if (dlg->exec()) {
const std::vector<Key> keys = dlg->selectedCertificates();
......
......@@ -17,6 +17,8 @@
#include "mainwindow.h"
#include "kleopatra_options.h"
#include "systrayicon.h"
#include "settings.h"
#include <smartcard/readerstatus.h>
#include <conf/configuredialog.h>
......@@ -143,6 +145,7 @@ public:
watcher->setDelay(1000);
keyCache->addFileSystemWatcher(watcher);
keyCache->setGroupsConfig(QStringLiteral("kleopatragroupsrc"));
keyCache->setGroupsEnabled(Settings().groupsEnabled());
}
void setupLogging()
......
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