Skip to content

Commit

Permalink
chore(ui): remove a completed TODO comment (#1004)
Browse files Browse the repository at this point in the history
QAction::triggered has the prototype triggered(bool checked=false), and
QAbstractButton::animateClick has the prototype animateClick(int msec=100).

In this case, we don't set the QAction checkable boolean and its by default, false.
An implicit conversion of false to int occurs here.

Actual signal to slot connection is also confirmed using GammaRay
  • Loading branch information
nishanthkarthik authored and trollixx committed Oct 10, 2018
1 parent 8bfacd7 commit eed785c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/libs/ui/widgets/searchtoolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ SearchToolBar::SearchToolBar(QWebView *webView, QWidget *parent)
// A workaround for QAbstractButton lacking support for multiple shortcuts.
QAction *action = new QAction(m_findPreviousButton);
action->setShortcuts(QKeySequence::FindPrevious);
// TODO: Investigate why direct connection does not work.
//connect(action, &QAction::triggered, m_findPreviousButton, &QToolButton::animateClick);
connect(action, &QAction::triggered, this, [this]() { m_findPreviousButton->animateClick(); });
addAction(action);

Expand Down

0 comments on commit eed785c

Please sign in to comment.