diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-06 19:56:33 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-06 19:56:33 +0300 |
commit | 73e73f46eaff4f2236b31ed5858738c6b5e26ea3 (patch) | |
tree | 3af375ca4be03bacb34aa72b173dd22a9f792380 /src/ChatPage.cc | |
parent | Initialize sync timer (diff) | |
download | nheko-73e73f46eaff4f2236b31ed5858738c6b5e26ea3.tar.xz |
Use const refs for the deserialized data
Diffstat (limited to 'src/ChatPage.cc')
-rw-r--r-- | src/ChatPage.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc index 732e3651..b5707cb9 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -124,7 +124,7 @@ void ChatPage::startSync() matrix_client_->sync(); } -void ChatPage::setOwnAvatar(QByteArray img) +void ChatPage::setOwnAvatar(const QByteArray &img) { if (img.size() == 0) return; @@ -134,7 +134,7 @@ void ChatPage::setOwnAvatar(QByteArray img) user_info_widget_->setAvatar(pixmap.toImage()); } -void ChatPage::syncCompleted(SyncResponse response) +void ChatPage::syncCompleted(const SyncResponse &response) { matrix_client_->setNextBatchToken(response.nextBatch()); @@ -142,7 +142,7 @@ void ChatPage::syncCompleted(SyncResponse response) view_manager_->sync(response.rooms()); } -void ChatPage::initialSyncCompleted(SyncResponse response) +void ChatPage::initialSyncCompleted(const SyncResponse &response) { if (!response.nextBatch().isEmpty()) matrix_client_->setNextBatchToken(response.nextBatch()); @@ -210,7 +210,7 @@ void ChatPage::fetchRoomAvatar(const QString &roomid, const QUrl &avatar_url) }); } -void ChatPage::updateOwnProfileInfo(QUrl avatar_url, QString display_name) +void ChatPage::updateOwnProfileInfo(const QUrl &avatar_url, const QString &display_name) { QSettings settings; auto userid = settings.value("auth/user_id").toString(); |