From 47684b3f30fb179640b764320a5e2c0766d9d339 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 4 Aug 2023 00:27:46 +0200 Subject: [PATCH] Fixes --- Quotient/e2ee/sssshandler.cpp | 4 ++-- Quotient/e2ee/sssshandler.h | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Quotient/e2ee/sssshandler.cpp b/Quotient/e2ee/sssshandler.cpp index e37a72d17..103e37984 100644 --- a/Quotient/e2ee/sssshandler.cpp +++ b/Quotient/e2ee/sssshandler.cpp @@ -91,9 +91,9 @@ void SSSSHandler::unlockSSSSFromPassword(const QString& password) } auto job = m_connection->callApi(); - connect(job, &BaseJob::finished, this, [=](){ + connect(job, &BaseJob::finished, this, [this, job, megolmDecryptionKey](){ auto keysJob = m_connection->callApi(job->jsonData()["version"_ls].toString()); - connect(keysJob, &BaseJob::finished, this, [=](){ + connect(keysJob, &BaseJob::finished, this, [this, keysJob, megolmDecryptionKey](){ const auto &rooms = keysJob->jsonData()["rooms"_ls].toObject(); for (const auto& roomId : rooms.keys()) { if (!m_connection->room(roomId)) { diff --git a/Quotient/e2ee/sssshandler.h b/Quotient/e2ee/sssshandler.h index 607d26519..c6b681f3c 100644 --- a/Quotient/e2ee/sssshandler.h +++ b/Quotient/e2ee/sssshandler.h @@ -6,19 +6,18 @@ #include #include -#include "connection.h" +#include "../connection.h" -class SSSSHandler : public QObject +class QUOTIENT_API SSSSHandler : public QObject { Q_OBJECT Q_PROPERTY(Quotient::Connection* connection READ connection WRITE setConnection NOTIFY connectionChanged) public: - - SSSSHandler(QObject* parent = nullptr); + explicit SSSSHandler(QObject* parent = nullptr); //! \brief Unlock the secret backup from the given password - void unlockSSSSFromPassword(const QString& password); + Q_INVOKABLE void unlockSSSSFromPassword(const QString& password); //! \brief Decrypt the key with this name from the account data QByteArray decryptKey(const QString& name, const QByteArray& decryptionKey) const;