diff --git a/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp index 3187a0cd..3e430ad7 100644 --- a/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp +++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp @@ -94,7 +94,7 @@ GpgME::Error QGpgMERefreshSMIMEKeysJob::start(const std::vector &key return {}; } - const bool gotWrongKeys = std::any_of(std::begin(keys), std::end(keys), [](const auto &k) { + const bool gotWrongKeys = std::any_of(std::begin(keys), std::end(keys), [](const GpgME::Key &k) { return k.protocol() != GpgME::CMS; }); if (gotWrongKeys) { diff --git a/lang/qt/src/qgpgmesignkeyjob.cpp b/lang/qt/src/qgpgmesignkeyjob.cpp index 506d64a1..1693a5be 100644 --- a/lang/qt/src/qgpgmesignkeyjob.cpp +++ b/lang/qt/src/qgpgmesignkeyjob.cpp @@ -57,6 +57,15 @@ using namespace GpgME; namespace { struct TrustSignatureProperties { + TrustSignatureProperties() = default; + // needed for C++11 because until C++14 "aggregate initialization requires + // class type, that has no default member initializers" + TrustSignatureProperties(TrustSignatureTrust trust_, unsigned int depth_, const QString &scope_) + : trust{trust_} + , depth{depth_} + , scope{scope_} + {} + TrustSignatureTrust trust = TrustSignatureTrust::None; unsigned int depth = 0; QString scope; diff --git a/lang/qt/src/util.cpp b/lang/qt/src/util.cpp index c6e1a6ae..d4190eb8 100644 --- a/lang/qt/src/util.cpp +++ b/lang/qt/src/util.cpp @@ -56,7 +56,7 @@ QStringList toFingerprints(const std::vector &keys) { QStringList fprs; fprs.reserve(keys.size()); - std::transform(std::begin(keys), std::end(keys), std::back_inserter(fprs), [](const auto &k) { + std::transform(std::begin(keys), std::end(keys), std::back_inserter(fprs), [](const GpgME::Key &k) { return QString::fromLatin1(k.primaryFingerprint()); }); return fprs; diff --git a/lang/qt/tests/run-exportjob.cpp b/lang/qt/tests/run-exportjob.cpp index 0f8fd8fd..40072c85 100644 --- a/lang/qt/tests/run-exportjob.cpp +++ b/lang/qt/tests/run-exportjob.cpp @@ -57,7 +57,7 @@ static void showUsageAndExitWithCode(int exitCode) exit(exitCode); } -static auto createExportJob(unsigned int mode) +static QGpgME::ExportJob *createExportJob(unsigned int mode) { if (mode & Context::ExportSecretSubkey) { return QGpgME::openpgp()->secretSubkeyExportJob(/*armor=*/true);