- connect(ui.hideButton, SIGNAL(clicked()), toggleSearchBar, SLOT(toggle()));
+ auto* hideSearchBar = new Action{{}, this, toggleSearchBar, &QAction::setChecked};
+ hideSearchBar->setShortcut(Qt::Key_Escape);
+ hideSearchBar->setShortcutConfigurable(false);
+ coll->addAction("HideSearchBar", hideSearchBar);
+
+ connect(ui.hideButton, &QAbstractButton::clicked, toggleSearchBar, &QAction::toggle);
+ connect(ui.searchEditLine, &QLineEdit::textChanged, this, &ChatViewSearchBar::delaySearch);
+ connect(&_searchDelayTimer, &QTimer::timeout, this, &ChatViewSearchBar::search);