When filter bar is focused, switch to view when tab key is pressed
ClosedPublic

Authored by ngraham on May 13 2019, 1:55 AM.

Details

Summary

Various people have requested that the tab key move keyboard focus from the filter bar's
text edit field to the main view. It already does this when the Enter and return keys
are pressed, but apparently this is not very intuitive and people expect Tab to work too.

This patch makes that behavior possible by moving the Lock button to the left of the
text edit field, and re-arranging the code so that the filter bar is initialized first.
This works because Qt assigns tab ordering by default according to the order of widget
construction. So if we simply construct the main view right after the filter bar, then
the tab ordering is set up this way automatically.

BUG: 403379
BUG: 403356
FIXED-IN: 19.08.0

Test Plan
  1. Activate Filter bar
  2. Hit Tab key
  3. View has become focused
  4. Play around in Dolphin for a while and notice no regressions or crashes

Diff Detail

Repository
R318 Dolphin
Branch
tab-from-filter-bar-into-view (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11987
Build 12005: arc lint + arc unit
ngraham created this revision.May 13 2019, 1:55 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMay 13 2019, 1:55 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
ngraham requested review of this revision.May 13 2019, 1:55 AM
elvisangelaccio accepted this revision.May 19 2019, 9:17 AM
This revision is now accepted and ready to land.May 19 2019, 9:17 AM
elvisangelaccio requested changes to this revision.May 19 2019, 9:22 AM

Actually, I noticed the following warning on startup:

QObject::connect(DolphinView, FilterBar): invalid null parameter

Probably the change in the initializations order breaks some connect() call.

This revision now requires changes to proceed.May 19 2019, 9:22 AM
ngraham updated this revision to Diff 58363.May 20 2019, 1:27 PM

Fix broken connect()

elvisangelaccio accepted this revision.May 25 2019, 3:01 PM
This revision is now accepted and ready to land.May 25 2019, 3:01 PM
This revision was automatically updated to reflect the committed changes.