diff options
| author | weinan li <[email protected]> | 2025-11-10 08:38:31 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-11-10 08:38:31 +0000 |
| commit | 3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 (patch) | |
| tree | 5109e8c061e5f298cc1a2f6e254ea462f7f855c3 /src/tests/kitemsettest.cpp | |
| parent | 4159b9c7874facc3774b59ed3aa13692bf14bb55 (diff) | |
dolphin: improve keyboard search behavior for repeated characters
The original keyboard search implementation had a limitation when dealing with files containing repeated characters like 44.txt. When typing 44, it would trigger rapid navigation to the next item starting with 4 instead of matching the full string 44.
This patch introduces a smarter search strategy:
1. First attempt full string matching for exact file names
2. If full match fails and user is typing repeating characters, fall back to rapid navigation using either:
- Last successful search string (for extended searches like 444 -> 4444)
- First character only (original rapid navigation behavior)
The changes include:
- Modified changeCurrentItem signal to include a found parameter for search result feedback
- Added m_lastSuccessfulSearch to track successful searches for better fallback behavior
- Used Qt::DirectConnection to ensure synchronous execution for immediate result feedback
This provides better user experience when searching for files with repeated characters while maintaining the rapid navigation feature for quick browsing.
BUG: 501851
Diffstat (limited to 'src/tests/kitemsettest.cpp')
0 files changed, 0 insertions, 0 deletions
