summary refs log tree commit diff
path: root/src/QuickSwitcher.cc
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/QuickSwitcher.cc
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/QuickSwitcher.cc')
-rw-r--r--src/QuickSwitcher.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/QuickSwitcher.cc b/src/QuickSwitcher.cc

index 2aa05f3c..3c9725d1 100644 --- a/src/QuickSwitcher.cc +++ b/src/QuickSwitcher.cc
@@ -56,9 +56,8 @@ RoomSearchInput::hideEvent(QHideEvent *event) TextField::hideEvent(event); } -QuickSwitcher::QuickSwitcher(QSharedPointer<Cache> cache, QWidget *parent) +QuickSwitcher::QuickSwitcher(QWidget *parent) : QWidget(parent) - , cache_{cache} { qRegisterMetaType<std::vector<RoomSearchResult>>(); setMaximumWidth(450); @@ -93,7 +92,8 @@ QuickSwitcher::QuickSwitcher(QSharedPointer<Cache> cache, QWidget *parent) QtConcurrent::run([this, query = query.toLower()]() { try { - emit queryResults(cache_->searchRooms(query.toStdString())); + emit queryResults( + cache::client()->searchRooms(query.toStdString())); } catch (const lmdb::error &e) { qWarning() << "room search failed:" << e.what(); }