{
const bool keyboardTimeWasValid = m_keyboardInputTime.isValid();
const qint64 keyboardInputTimeElapsed = m_keyboardInputTime.restart();
- if (keyboardInputTimeElapsed > QApplication::keyboardInputInterval()
- || !keyboardTimeWasValid || keys.isEmpty()) {
+ const qint64 timeout = 5000;
+ if (keyboardInputTimeElapsed > timeout || !keyboardTimeWasValid || keys.isEmpty()) {
m_searchedString.clear();
}
QCOMPARE(spy.count(), 1);
QCOMPARE(spy.takeFirst(), QList<QVariant>() << "fi" << false);
- // If the delay between two key presses is larger than QApplication::keyboardInputInterval(),
+ // If the delay between two key presses is larger than 5000 milliseconds,
// a new search is started. We add a small safety margin to avoid race conditions.
- QTest::qWait(QApplication::keyboardInputInterval() + 10);
+ QTest::qWait(5000 + 10);
m_keyboardSearchManager.addKeys("l");
QCOMPARE(spy.count(), 1);