diff options
| author | JBB <jbb.prv@gmx.de> | 2021-12-05 16:16:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 16:16:48 +0100 |
| commit | 4ef85abe637cc5735f12e053e0faf4dd8e159564 (patch) | |
| tree | b9faad496c326e4e65a32449b46433eb264fd80a /src/client/QXmppAtmManager.cpp | |
| parent | ba1e5dff3ad852573aadad2e378899f7d9b03355 (diff) | |
| download | qxmpp-4ef85abe637cc5735f12e053e0faf4dd8e159564.tar.gz | |
AtmManager: Fix compilation with Qt6 (#381)
Diffstat (limited to 'src/client/QXmppAtmManager.cpp')
| -rw-r--r-- | src/client/QXmppAtmManager.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client/QXmppAtmManager.cpp b/src/client/QXmppAtmManager.cpp index e0255a9e..1be9052f 100644 --- a/src/client/QXmppAtmManager.cpp +++ b/src/client/QXmppAtmManager.cpp @@ -409,20 +409,22 @@ QFuture<void> QXmppAtmManager::authenticate(const QString &encryption, const QMu } else { auto future = m_trustStorage->setTrustLevel(encryption, keyIds, QXmppTrustStorage::Authenticated); await(future, this, [=]() { - if (m_trustStorage->securityPolicy(encryption) == QXmppTrustStorage::Toakafa) { - auto future = distrustAutomaticallyTrustedKeys(encryption, keyIds.uniqueKeys()); - await(future, this, [=]() { + await(m_trustStorage->securityPolicy(encryption), this, [=](const auto securityPolicy) { + if (securityPolicy == QXmppTrustStorage::Toakafa) { + auto future = distrustAutomaticallyTrustedKeys(encryption, keyIds.uniqueKeys()); + await(future, this, [=]() { + auto future = makePostponedTrustDecisions(encryption, keyIds.values()); + await(future, this, [=]() { + interface->reportFinished(); + }); + }); + } else { auto future = makePostponedTrustDecisions(encryption, keyIds.values()); await(future, this, [=]() { interface->reportFinished(); }); - }); - } else { - auto future = makePostponedTrustDecisions(encryption, keyIds.values()); - await(future, this, [=]() { - interface->reportFinished(); - }); - } + } + }); }); } |
