aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/pressandhold
Commit message (Collapse)AuthorAgeFilesLines
* Test and fix AbstractButton::pressAndHold()J-P Nurmi2016-02-121-4/+7
| | | | | | | | | | | Using the same auto test that already exists for TextField and TextArea nicely exposed some difference in the behavior: - the signal wasn't canceled on second press - the signal was canceled right away on any tiny move. now it allows the same little threshold than TextField and TextArea Change-Id: I6b9bd19c614b36dd0ec7b232f821af3aa929d02a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Refactor press and hold testsJ-P Nurmi2015-11-122-0/+206
We can't rely on timers in auto tests. They are not fired accurately under heavy CPU load => random CI failures. This change make the press and hold tests independent of timeouts. The idea in a nutshell: the test creates two control instances, and sends press events to both of them. Both controls run their timers and emit pressAndHold() - unless canceled. The test waits as long as it takes for the second control to emit pressAndHold(). At that point we can reliably assume that the first control would have already emitted the signal, if it was not canceled as appropriate. Change-Id: I96aaf4d204db368171209271a4a0fa2ff15cc323 Task-number: QTBUG-47963 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>