┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/kitemlistkeyboardsearchmanagertest.cpp
AgeCommit message (Collapse)Author
2025-11-10dolphin: improve keyboard search behavior for repeated charactersweinan li
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
2025-02-22kitemlistkeyboardsearchmanager: smarter search start positionYifan Zhu
Search from the next position for new search and special repeated key search. Otherwise search from the current position, which is current selected item if something is selected or in selection mode, and 0 (the beginning) otherwise. Test plan: - create directory with files ab1, ab2, and ab3 - click ab2, and press escape to deselect - type ab; verify that ab1 is selected - wait a while, type ab again, verify that ab2 is selected - wait a while, type ab again, verify that ab3 is selected - click ab1, type ab, verify that ab2 is selected BUG: 422951
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2021-03-13Enable test mode in all testElvis Angelaccio
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-10-26When the selection is deselected, restart the keyboard search from the beginningMéven Car
Summary: BUG: 411538 FIXED-IN: 19.12 Test Plan: Open a directory with 3 files starting with the same letter. 1. Press this letter key twice 2. The second file is selected 3. Deselect the file with the mouse or using Esc 4. Wait 1 second 5. Press the same key again Before: The third file gets selected After: The first file get selected ctest Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23716
2018-02-03Port QSignalSpy to new signal syntaxElvis Angelaccio
More compile-time safety. Tests still pass. This also fixes a krazy warning about "normalised signal/slot signatures".
2015-02-26Use QT_GUILESS_MAINHeiko Becker
REVIEW: 122730
2014-12-24Fix compilation with Qt 5.2 and 5.3; QSignalSpy can't take a function ↵David Faure
pointer yet
2014-12-18Ported tests away from KRandomSequence, QTest::kWaitForSignal and KTempDir.Emmanuel Pescosta
All tests passed!
2014-10-18Port test to qt5Montel Laurent
2013-06-20Make it possible to select files like "a_b" using keyboard searchFrank Reininghaus
The problem was that pressing the Shift key would reset the keyboard search. BUG: 321286 FIXED-IN: 4.11.0 REVIEW: 111102
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-03-29KItemListKeyboardSearchManager: make it possible to choose the timeoutFrank Reininghaus
It's now possible to change the timeout, after which any call of KItemListKeyboardSearchManager::addKeys(const QString&) starts a new search, from the default value of 5000 milliseconds. This is not used in Dolphin at the moment, but it permits to reduce the timeout to a small value in the unit test. Before this change, the unit test took more than 5 seconds to complete. (cherry picked from commit 82fc1b54bd01768f50aba7d328cdcde7de1483d7)
2012-03-28Increase the timeout in KItemListKeyboardSearchManager to 5 secondsFrank Reininghaus
The previous timeout [QApplication::keyboardInputInterval()] was too short to do a multi-letter search for users who do not type extremely fast. (cherry picked from commit 02eab49b2de51c31fe46a0d9501327b579b3648e)
2011-08-30KItemListKeyboardSearchManager improvements and unit testsFrank Reininghaus
This commit implements a 'repeated key search' feature, similar to QAbstractItemView, and adds unit tests for keyboard searching.