[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdecoration] autotests: [autotests] Fix DecorationButtonTest::testPressAndHold with Qt 5.9
From:       Martin_Flöser <null () kde ! org>
Date:       2017-07-01 6:58:13
Message-ID: E1dRCM9-0003Xd-Ry () code ! kde ! org
[Download RAW message or body]

Git commit da28d8a4eb5582c35617564939cd7ad865a269d1 by Martin Fl=C3=B6ser.
Committed on 01/07/2017 at 06:56.
Pushed by graesslin into branch 'master'.

[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.

M  +1    -1    autotests/decorationbuttontest.cpp

https://commits.kde.org/kdecoration/da28d8a4eb5582c35617564939cd7ad865a269d1

diff --git a/autotests/decorationbuttontest.cpp b/autotests/decorationbutto=
ntest.cpp
index c15a2cf..6f61882 100644
--- a/autotests/decorationbuttontest.cpp
+++ b/autotests/decorationbuttontest.cpp
@@ -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);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic