Don't use shared pointers for cache
This commit is contained in:
parent
4c4ea557b3
commit
ebed87ea57
17 changed files with 86 additions and 96 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue