┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2023-05-08 17:46:51 +0200
committerMéven Car <[email protected]>2023-05-08 17:46:51 +0200
commit863ee3a87cee8b1f22a311d6a6a62e56714b5eae (patch)
tree728a2f70486e1835053e5c3431e72c62eb69ff82 /src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
parent69f6b9b78b71f8369dc0ab9b9f9aecfd928d3eb1 (diff)
parent26808a188ccb5e35a05b37709e4fe61263c46032 (diff)
Merge branch 'master' into kf6
Diffstat (limited to 'src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp')
-rw-r--r--src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
index b7318b344..c74ef1638 100644
--- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
+++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
@@ -27,6 +27,11 @@ bool KItemListKeyboardSearchManager::shouldClearSearchIfInputTimeReached()
return (keyboardInputTimeElapsed > m_timeout) || !keyboardTimeWasValid;
}
+bool KItemListKeyboardSearchManager::isSearchAsYouTypeActive() const
+{
+ return !m_searchedString.isEmpty() && !m_keyboardInputTime.hasExpired(m_timeout);
+}
+
void KItemListKeyboardSearchManager::addKeys(const QString &keys)
{
if (shouldClearSearchIfInputTimeReached()) {
@@ -63,11 +68,6 @@ void KItemListKeyboardSearchManager::addKeys(const QString &keys)
m_keyboardInputTime.start();
}
-bool KItemListKeyboardSearchManager::addKeyBeginsNewSearch() const
-{
- return m_keyboardInputTime.hasExpired(m_timeout) || m_searchedString.isEmpty();
-}
-
void KItemListKeyboardSearchManager::setTimeout(qint64 milliseconds)
{
m_timeout = milliseconds;