diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-11 12:20:00 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-30 12:03:13 +0000 |
commit | b0852eb2714eac824bff36216b3301f2e02f82a9 (patch) | |
tree | b37cd26b026b68a5f59d7dcb537892809d15ec5c | |
parent | 4dc35d26f56066f46403a8584d2ef9a61a1c63ce (diff) |
tst_qtooltip: Move cursor away from tooltip.
When executing the test in a sequence (as done by make check after
tst_qstackedlayout), tst_QToolTip::task183679 often fails since
apparently the tooltip is hidden when the cursor is near it.
Move to the cursor to the right corner of the widget to fix this.
Change-Id: I3b13239e77cb387f1b1425fab79c8d6faa27b5bb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r-- | tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp index 0de9e188a0..d7746a2ee1 100644 --- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp +++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp @@ -103,6 +103,10 @@ void tst_QToolTip::task183679() Widget_task183679 widget; widget.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(50, 50)); + // Ensure cursor is not over tooltip, which causes it to hide +#ifndef QT_NO_CURSOR + QCursor::setPos(widget.geometry().topRight() + QPoint(-50, 50)); +#endif widget.setWindowTitle(QLatin1String(QTest::currentTestFunction()) + QLatin1Char(' ') + QLatin1String(QTest::currentDataTag())); widget.show(); |