X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsearchbar.cpp;h=d7e0cfc3a526003dbdf0143b33af330fb9316ff9;hp=18b0b438a34d9afd869c071102b2152426d4a763;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hpb=6eefdfc697067d184a589fc8a231b16316c09106 diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp index 18b0b438..d7e0cfc3 100644 --- a/src/qtui/chatviewsearchbar.cpp +++ b/src/qtui/chatviewsearchbar.cpp @@ -43,9 +43,10 @@ ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) QAction *toggleSearchBar = coll->action("ToggleSearchBar"); connect(toggleSearchBar, &QAction::toggled, this, &QWidget::setVisible); - auto *hideSearchBar = coll->add("HideSearchBar", toggleSearchBar, SLOT(setChecked(bool))); - hideSearchBar->setShortcutConfigurable(false); + 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);