aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2019-08-26 17:56:43 +0300
committerKonstantin Ritt <ritt.ks@gmail.com>2019-09-27 15:33:32 +0300
commit100550dd22dc8eaa47405cdb3e7e461edb01a7a3 (patch)
tree83c7aa041db43bbd1ee569a1f4947b6cb339927e /tests/auto
parentd39a6d80f63414a4e933ac2f859805635850942a (diff)
QQuickToolTip: fix setTimeout() behavior when tool tip is visible
by applying the passed timeout value prior to re-starting the timer Change-Id: I27953dbb4781b5cb0c2039d56faa56f3c000206f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_tooltip.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tooltip.qml b/tests/auto/controls/data/tst_tooltip.qml
index 18911895..70579c70 100644
--- a/tests/auto/controls/data/tst_tooltip.qml
+++ b/tests/auto/controls/data/tst_tooltip.qml
@@ -205,6 +205,15 @@ TestCase {
else
control.visible = true
compare(control.visible, true)
+ // wait a bit to make sure that it's still visible
+ wait(50)
+ compare(control.visible, true)
+ // re-arm for another 200 ms
+ control.timeout = 200
+ compare(control.visible, true)
+ // ensure that it's still visible after 150 ms (where old timeout < 150 < new timeout)
+ wait(150)
+ compare(control.visible, true)
tryCompare(control, "visible", false)
}