From 100550dd22dc8eaa47405cdb3e7e461edb01a7a3 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 26 Aug 2019 17:56:43 +0300 Subject: 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 --- tests/auto/controls/data/tst_tooltip.qml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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) } -- cgit v1.2.3