Commit da28d8a4 authored by Martin Flöser's avatar Martin Flöser

[autotests] Fix DecorationButtonTest::testPressAndHold with Qt 5.9

The test does a QTest::qWait for the double click interval. But when
returning form qWait it did not wait the expected 400 msec, but only
399, at least the elapsed timer waiting for the double click interval
has not yet expired.

To make the test pass a small amount is added to the wait.
parent 83341538
......@@ -1263,7 +1263,7 @@ void DecorationButtonTest::testMenuPressAndHold()
QCOMPARE(releaseEvent.isAccepted(), true);
QCOMPARE(clickedSpy.count(), 1);
QTest::qWait(QGuiApplication::styleHints()->mouseDoubleClickInterval());
QTest::qWait(QGuiApplication::styleHints()->mouseDoubleClickInterval() + 5);
// and it shouldn't be a double click
pressEvent.setAccepted(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment