summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@kdab.com>2016-08-24 08:31:02 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-08-24 19:33:34 +0000
commit87e6c4b98a48ec53493b56265328ed8d2d02e19c (patch)
treef4cf64cbc5cdd7ca75557cc32c7df44dcd7bff91
parent1f276f1d346a6fdde8c596571a4606ff61fb7ff3 (diff)
Fix order handling in input sequences
Change-Id: I79c159c70ed81345b58c6dabfd60437e20554e94 Task-Id: QTBUG-54585 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/input/backend/inputsequence.cpp3
-rw-r--r--tests/auto/input/inputsequence/tst_inputsequence.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/input/backend/inputsequence.cpp b/src/input/backend/inputsequence.cpp
index 140a8fe64..66ce6e920 100644
--- a/src/input/backend/inputsequence.cpp
+++ b/src/input/backend/inputsequence.cpp
@@ -101,6 +101,9 @@ void InputSequence::reset()
bool InputSequence::actionTriggered(Qt3DCore::QNodeId input, const qint64 currentTime)
{
+ if (input != m_inputsToTrigger.first())
+ return false;
+
// Save the last input
m_lastInputId = input;
// Return false if we've spent too much time in between two sequences
diff --git a/tests/auto/input/inputsequence/tst_inputsequence.cpp b/tests/auto/input/inputsequence/tst_inputsequence.cpp
index 442173d0c..1e1e84834 100644
--- a/tests/auto/input/inputsequence/tst_inputsequence.cpp
+++ b/tests/auto/input/inputsequence/tst_inputsequence.cpp
@@ -271,7 +271,7 @@ private Q_SLOTS:
deviceBackend->setButtonPressed(Qt::Key_D, true);
// THEN
- QCOMPARE(backendInputSequence.process(&handler, 1000001100), true); // Yes, that's another bug
+ QCOMPARE(backendInputSequence.process(&handler, 1000001100), false);
// WHEN
deviceBackend->setButtonPressed(Qt::Key_D, false);