D13152: Fix loop of FocusIn events

Elvis Angelaccio noreply at phabricator.kde.org
Sun May 27 16:40:04 BST 2018


elvisangelaccio created this revision.
elvisangelaccio added reviewers: Dolphin, anthonyfieroni.
Restricted Application added a project: Dolphin.
Restricted Application added a subscriber: kfm-devel.
elvisangelaccio requested review of this revision.

REVISION SUMMARY
  Commit 43da84eefc7d <https://phabricator.kde.org/R318:43da84eefc7d68ce86cda2d353216dbe7552fc2c> introduced the risk of entering an endless loop of
  `FocusIn` events sent to DolphinSearchBox (see D11871 <https://phabricator.kde.org/D11871>).
  
  This `setFocus()` shouldn't be here in the first place. It doesn't make
  any sense to request focus if the widget just received a `FocusIn` event.
  
  It was added by commit e1d88c4d69 <https://phabricator.kde.org/R318:e1d88c4d69ba0fb38951954dceab937741528eab>, probably only to match
  KUrlNavigator::eventFilter(), but KUrlNavigator has it own `setFocus()`
  implementation (which DolphinSearchBox hasn't).
  
  Also KUrlNaviagotor has the following comment above the declaration of
  `setFocus()` (in kurlnavigator.h):
  
    // KDE5: Remove and listen for focus-signal instead

REPOSITORY
  R318 Dolphin

BRANCH
  Applications/18.04

REVISION DETAIL
  https://phabricator.kde.org/D13152

AFFECTED FILES
  src/search/dolphinsearchbox.cpp

To: elvisangelaccio, #dolphin, anthonyfieroni
Cc: kfm-devel, spoorun, navarromorales, isidorov, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180527/8ab8aaac/attachment.htm>


More information about the kfm-devel mailing list