diff options
-rw-r--r-- | lib/connection.cpp | 5 | ||||
-rw-r--r-- | lib/converters.h | 4 | ||||
-rw-r--r-- | lib/e2ee/qolmaccount.cpp | 6 | ||||
-rw-r--r-- | lib/e2ee/qolmaccount.h | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 690b3f6a..701f78c2 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -2308,8 +2308,9 @@ bool Connection::Private::createOlmSession(const QString& targetUserId, edKeyForUserDevice(targetUserId, targetDeviceId).toLatin1(), signedOneTimeKey->toJsonForVerification(), signature)) { - qWarning(E2EE) << "Failed to verify one-time-key signature for" << targetUserId - << targetDeviceId << ". Skipping this device."; + qWarning(E2EE) << "Failed to verify one-time-key signature for" + << targetUserId << targetDeviceId + << ". Skipping this device."; return false; } const auto recipientCurveKey = diff --git a/lib/converters.h b/lib/converters.h index 385982ab..c445442c 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -86,8 +86,8 @@ struct JsonConverter : _impl::JsonExporter<T> { static T load(const QJsonDocument& jd) { return doLoad(jd.object()); } }; -template <typename T, - typename = std::enable_if_t<!std::is_constructible_v<QJsonValue, T>>> +template <typename T> + requires (!std::is_constructible_v<QJsonValue, T>) inline auto toJson(const T& pod) // -> can return anything from which QJsonValue or, in some cases, QJsonDocument // is constructible diff --git a/lib/e2ee/qolmaccount.cpp b/lib/e2ee/qolmaccount.cpp index c3714363..cd10f165 100644 --- a/lib/e2ee/qolmaccount.cpp +++ b/lib/e2ee/qolmaccount.cpp @@ -145,9 +145,11 @@ size_t QOlmAccount::generateOneTimeKeys(size_t numberOfKeys) UnsignedOneTimeKeys QOlmAccount::oneTimeKeys() const { const size_t oneTimeKeyLength = olm_account_one_time_keys_length(m_account); - QByteArray oneTimeKeysBuffer(oneTimeKeyLength, '0'); + QByteArray oneTimeKeysBuffer(static_cast<int>(oneTimeKeyLength), '0'); - const auto error = olm_account_one_time_keys(m_account, oneTimeKeysBuffer.data(), oneTimeKeyLength); + const auto error = olm_account_one_time_keys(m_account, + oneTimeKeysBuffer.data(), + oneTimeKeyLength); if (error == olm_error()) { throw lastError(m_account); } diff --git a/lib/e2ee/qolmaccount.h b/lib/e2ee/qolmaccount.h index 23fe58dd..f2a31314 100644 --- a/lib/e2ee/qolmaccount.h +++ b/lib/e2ee/qolmaccount.h @@ -64,8 +64,6 @@ public: //! Sign all one time keys. OneTimeKeys signOneTimeKeys(const UnsignedOneTimeKeys &keys) const; - SignedOneTimeKey signedOneTimeKey(const QByteArray &key, const QString &signature) const; - UploadKeysJob* createUploadKeyRequest(const UnsignedOneTimeKeys& oneTimeKeys) const; DeviceKeys deviceKeys() const; |