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

Use default value for OpenPGP keyserver provided by gpg

gpg has just changed its default because hkps.pool.sks-keyservers.net
is no more.

GnuPG-bug-id: 5514
parent b5be2385
......@@ -104,6 +104,7 @@ if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.16.0")
endif()
if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.16.1")
set(QGPGME_SUPPORTS_CHANGING_EXPIRATION_OF_COMPLETE_KEY 1)
set(QGPGME_CRYPTOCONFIGENTRY_HAS_DEFAULT_VALUE 1)
endif()
# Kdepimlibs packages
......
......@@ -35,3 +35,6 @@
/* Defined if QGpgME supports changing the expiration date of the primary key and the subkeys simultaneously */
#cmakedefine QGPGME_SUPPORTS_CHANGING_EXPIRATION_OF_COMPLETE_KEY 1
/* Defined if QGpgME supports retrieving the default value of a config entry */
#cmakedefine QGPGME_CRYPTOCONFIGENTRY_HAS_DEFAULT_VALUE 1
......@@ -152,11 +152,6 @@ DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage(QWidget *
l->addWidget(new QLabel{i18n("OpenPGP keyserver:"), this});
mOpenPGPKeyserverEdit = new QLineEdit{this};
if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() < "2.1.16") {
mOpenPGPKeyserverEdit->setPlaceholderText(QStringLiteral("hkp://keys.gnupg.net"));
} else {
mOpenPGPKeyserverEdit->setPlaceholderText(QStringLiteral("hkps://hkps.pool.sks-keyservers.net"));
}
l->addWidget(mOpenPGPKeyserverEdit);
......@@ -268,6 +263,18 @@ void DirectoryServicesConfigurationPage::load()
mOpenPGPKeyserverEdit->setText(mOpenPGPServiceEntry ? mOpenPGPServiceEntry->stringValue() : QString());
mOpenPGPKeyserverEdit->setEnabled(mOpenPGPServiceEntry && !mOpenPGPServiceEntry->isReadOnly());
#ifdef QGPGME_CRYPTOCONFIGENTRY_HAS_DEFAULT_VALUE
if (newEntry && !newEntry->defaultValue().isNull()) {
mOpenPGPKeyserverEdit->setPlaceholderText(newEntry->defaultValue().toString());
} else
#endif
{
if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() < "2.1.16") {
mOpenPGPKeyserverEdit->setPlaceholderText(QStringLiteral("hkp://keys.gnupg.net"));
} else {
mOpenPGPKeyserverEdit->setPlaceholderText(QStringLiteral("hkps://hkps.pool.sks-keyservers.net"));
}
}
}
// read LDAP timeout
......
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