aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp2
-rw-r--r--lib/events/event.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index f59d2962..42b17570 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -451,7 +451,7 @@ void Connection::Private::completeSetup(const QString& mxId)
#ifndef Quotient_E2EE_ENABLED
qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off.";
#else // Quotient_E2EE_ENABLED
- AccountSettings accountSettings(userId);
+ AccountSettings accountSettings(data->userId());
encryptionManager.reset(
new EncryptionManager(accountSettings.encryptionAccountPickle()));
if (accountSettings.encryptionAccountPickle().isEmpty()) {
diff --git a/lib/events/event.h b/lib/events/event.h
index 309ebddf..9f2f4f91 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -327,8 +327,9 @@ inline auto visit(const BaseEventT& event, FnT&& visitor)
}
namespace _impl {
+ // Using bool instead of auto below because auto apparently upsets MSVC
template <class BaseT, typename FnT>
- inline constexpr auto needs_downcast =
+ inline constexpr bool needs_downcast =
std::is_base_of_v<BaseT, std::decay_t<fn_arg_t<FnT>>>
&& !std::is_same_v<BaseT, std::decay_t<fn_arg_t<FnT>>>;
}