aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppAtmManager.cpp
diff options
context:
space:
mode:
authorJBB <jbb.prv@gmx.de>2021-12-05 16:16:48 +0100
committerGitHub <noreply@github.com>2021-12-05 16:16:48 +0100
commit4ef85abe637cc5735f12e053e0faf4dd8e159564 (patch)
treeb9faad496c326e4e65a32449b46433eb264fd80a /src/client/QXmppAtmManager.cpp
parentba1e5dff3ad852573aadad2e378899f7d9b03355 (diff)
downloadqxmpp-4ef85abe637cc5735f12e053e0faf4dd8e159564.tar.gz
AtmManager: Fix compilation with Qt6 (#381)
Diffstat (limited to 'src/client/QXmppAtmManager.cpp')
-rw-r--r--src/client/QXmppAtmManager.cpp22
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();
- });
- }
+ }
+ });
});
}