Verified Commit b752bbf2 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Change visibility of passphrase protection later

When the EnterDetailsPage is created it is too early to
check for pgp() so we do it now when the result label
is updated as we then know if pgp was selected in
the dialog.
parent 089db785
Pipeline #46887 passed with stage
in 19 minutes and 3 seconds
...@@ -760,11 +760,6 @@ public: ...@@ -760,11 +760,6 @@ public:
const auto entry = conf->entry(QStringLiteral("gpg-agent"), const auto entry = conf->entry(QStringLiteral("gpg-agent"),
QStringLiteral("Passphrase policy"), QStringLiteral("Passphrase policy"),
QStringLiteral("enforce-passphrase-constraints")); QStringLiteral("enforce-passphrase-constraints"));
if (!pgp()) {
// GnuPG / GPGME as of 2.2.27 do not support
// pinentry mode and passphrase setting for S/MIME
ui.withPassCB->setVisible(false);
}
if (entry && entry->boolValue()) { if (entry && entry->boolValue()) {
qCDebug(KLEOPATRA_LOG) << "Disabling passphrace cb because of agent config."; qCDebug(KLEOPATRA_LOG) << "Disabling passphrace cb because of agent config.";
ui.withPassCB->setEnabled(false); ui.withPassCB->setEnabled(false);
...@@ -800,6 +795,7 @@ private Q_SLOTS: ...@@ -800,6 +795,7 @@ private Q_SLOTS:
void slotUpdateResultLabel() void slotUpdateResultLabel()
{ {
ui.resultLE->setText(pgp() ? pgpUserID() : cmsDN()); ui.resultLE->setText(pgp() ? pgpUserID() : cmsDN());
ui.withPassCB->setVisible(pgp());
} }
private: private:
......
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