From 18061f06002b349bdc0e5b439a84d54545b9c87e Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Fri, 11 May 2018 16:00:14 +0300 Subject: Use the correct avatar size for HiDPI displays --- src/MatrixClient.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MatrixClient.cc') diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc index 6336a5cf..a9720d10 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc @@ -59,6 +59,8 @@ MatrixClient::MatrixClient(QObject *parent) , mediaApiUrl_{"/_matrix/media/r0"} , serverProtocol_{"https"} { + qRegisterMetaType(); + QSettings settings; txn_id_ = settings.value("client/transaction_id", 1).toInt(); @@ -344,8 +346,7 @@ MatrixClient::sync() noexcept } try { - mtx::responses::Sync response = nlohmann::json::parse(data); - emit syncCompleted(response); + emit syncCompleted(nlohmann::json::parse(std::move(data))); } catch (std::exception &e) { qWarning() << "Sync error: " << e.what(); } @@ -461,7 +462,6 @@ MatrixClient::initialSync() noexcept return; } - qRegisterMetaType(); QtConcurrent::run([data = reply->readAll(), this]() { try { emit initialSyncCompleted(nlohmann::json::parse(std::move(data))); -- cgit 1.5.1