diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 10:09:26 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-03 10:09:26 +0200 |
| commit | a81c794703664627aa39b282ff6d34c82889a606 (patch) | |
| tree | 1f08971b68775125db692d4731c3a0d5183263bd /src/main.cpp | |
| parent | 9dbc6c61a4e0f394ced748c8f7c753bfff9eda9c (diff) | |
| download | qtmaildir-a81c794703664627aa39b282ff6d34c82889a606.tar.gz qtmaildir-a81c794703664627aa39b282ff6d34c82889a606.zip | |
fix: let key bindings win over the thread list's type-to-search
With the thread list focused, 'h' jumped to the next thread whose subject
began with "h" instead of toggling HTML, and j, k, a, d, N, F, u and G were
swallowed the same way. The keymap only worked when focus happened to be
somewhere else.
installEventFilter(this) was on the MainWindow, and a window-level filter
only sees key presses the focused child did not consume. QAbstractItemView
consumes plain letters for its type-to-search feature, so it took them
first. The filter is now installed on the thread view as well, which puts
the keymap ahead of that search. The existing query-bar guard in
eventFilter() still keeps ordinary typing working there.
Found by the maintainer while walking task 13 item 14, and confirmed fixed
on screen.
No regression test: a QTest::keyClick attempt passed both with and without
the fix, because synthetic key posting does not reproduce the focus and
consumption path that causes the bug. A test that cannot fail is worse than
none, so it was dropped rather than kept for appearances.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/main.cpp')
0 files changed, 0 insertions, 0 deletions
