From 545852ca45fadb3ee43072763e81cbfba0366e25 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 19 Nov 2021 21:49:46 +0100 Subject: Fix compilation --- CMakeLists.txt | 2 +- lib/connection.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3977a9d0..dbb43f89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ if (${PROJECT_NAME}_ENABLE_E2EE) endif() endif() -find_package(Qt${QT_MAJOR_VERSION}Keychain REQUIRED) +find_package(${Qt}Keychain REQUIRED) # Set up source files list(APPEND lib_SRCS diff --git a/lib/connection.cpp b/lib/connection.cpp index 6ed116c4..95ed1eb6 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -2045,9 +2045,11 @@ PicklingMode Connection::picklingMode() const void Connection::saveOlmAccount() { qCDebug(E2EE) << "Saving olm account"; +#ifdef Quotient_E2EE_ENABLED auto pickle = d->olmAccount->pickle(d->picklingMode); AccountSettings(d->data->userId()).setEncryptionAccountPickle(std::get(pickle)); //TODO handle errors +#endif } QString Connection::e2eeDataDir() const @@ -2062,6 +2064,7 @@ QString Connection::e2eeDataDir() const return path; } +#ifdef Quotient_E2EE_ENABLED QJsonObject Connection::decryptNotification(const QJsonObject ¬ification) { auto room = provideRoom(notification["room_id"].toString()); @@ -2072,3 +2075,4 @@ QJsonObject Connection::decryptNotification(const QJsonObject ¬ification) } return decrypted->fullJson(); } +#endif -- cgit v1.2.3