summary refs log tree commit diff
path: root/src/dialogs/RoomSettings.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-08 20:30:09 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-08 20:30:09 +0300
commitebed87ea5730f9a49d6cf6d03a2a3a8ef7e2aa52 (patch)
treeb022e968f92dee9c52e73b07de7fadd304cc5299 /src/dialogs/RoomSettings.cpp
parentReplace shared pointers of MatrixClient with a single instance (diff)
downloadnheko-ebed87ea5730f9a49d6cf6d03a2a3a8ef7e2aa52.tar.xz
Don't use shared pointers for cache
Diffstat (limited to 'src/dialogs/RoomSettings.cpp')
-rw-r--r--src/dialogs/RoomSettings.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dialogs/RoomSettings.cpp b/src/dialogs/RoomSettings.cpp
index b2c87c94..976d2acc 100644
--- a/src/dialogs/RoomSettings.cpp
+++ b/src/dialogs/RoomSettings.cpp
@@ -15,18 +15,17 @@
 
 using namespace dialogs;
 
-RoomSettings::RoomSettings(const QString &room_id, QSharedPointer<Cache> cache, QWidget *parent)
+RoomSettings::RoomSettings(const QString &room_id, QWidget *parent)
   : QFrame(parent)
-  , cache_{cache}
   , room_id_{std::move(room_id)}
 {
         setMaximumWidth(385);
 
         try {
-                auto res = cache_->getRoomInfo({room_id_.toStdString()});
+                auto res = cache::client()->getRoomInfo({room_id_.toStdString()});
                 info_    = res[room_id_];
 
-                setAvatar(QImage::fromData(cache_->image(info_.avatar_url)));
+                setAvatar(QImage::fromData(cache::client()->image(info_.avatar_url)));
         } catch (const lmdb::error &e) {
                 qWarning() << "failed to retrieve room info from cache" << room_id;
         }