┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
diff options
context:
space:
mode:
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;