Verified Commit e2ce155d authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Disable automatic trust database check during initial key listing

This avoids intermittent delays caused by the trust database check when
starting Kleopatra.

GnuPG-bug-id: 6261
parent 88252c0c
Pipeline #261839 passed with stage
in 3 minutes and 22 seconds
......@@ -68,6 +68,9 @@ message(STATUS "GpgME++ Version ${Gpgmepp_VERSION}")
if (Gpgmepp_VERSION VERSION_GREATER_EQUAL "1.16.0")
set(GPGMEPP_SUPPORTS_TRUST_SIGNATURES 1)
endif()
if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.18.1")
set(QGPGME_LISTALLKEYSJOB_HAS_OPTIONS 1)
endif()
find_package(Boost 1.34.0)
set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries" URL "https://www.boost.org" TYPE REQUIRED PURPOSE "Boost is required for building most KDEPIM applications")
......
/* Defined if GpgME++ supports trust signatures */
#cmakedefine GPGMEPP_SUPPORTS_TRUST_SIGNATURES 1
/* Defined if QGpgME::ListAllKeysJob supports setting options */
#cmakedefine QGPGME_LISTALLKEYSJOB_HAS_OPTIONS 1
......@@ -1488,6 +1488,12 @@ Error KeyCache::RefreshKeysJob::Private::startKeyListing(GpgME::Protocol proto)
if (!job) {
return Error();
}
#ifdef QGPGME_LISTALLKEYSJOB_HAS_OPTIONS
if (!m_cache->initialized()) {
// avoid delays during the initial key listing
job->setOptions(QGpgME::ListAllKeysJob::DisableAutomaticTrustDatabaseCheck);
}
#endif
#if 0
aheinecke: 2017.01.12:
......
Supports Markdown
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