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

index beae9aab..f3753971 100644 --- a/src/TextInputWidget.cc +++ b/src/TextInputWidget.cc
@@ -453,12 +453,12 @@ TextInputWidget::TextInputWidget(QWidget *parent) input_->setFixedHeight(textInputHeight); }); connect(input_, &FilteredTextEdit::showSuggestions, this, [this](const QString &q) { - if (q.isEmpty() || cache_.isNull()) + if (q.isEmpty() || !cache::client()) return; QtConcurrent::run([this, q = q.toLower().toStdString()]() { try { - emit input_->resultsRetrieved(cache_->searchUsers( + emit input_->resultsRetrieved(cache::client()->searchUsers( ChatPage::instance()->currentRoom().toStdString(), q)); } catch (const lmdb::error &e) { std::cout << e.what() << '\n';