From 22a83f364e074a56fa21d672bc01f440f833061f Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Mon, 26 Sep 2011 16:54:50 +0200 Subject: Re-enabled test and made it pass on Linux Task-number: QTBUG-20753, QTBUG-21424 Change-Id: Icc4abf82c243b31b43d167df921e0585a5e89a1e Reviewed-on: http://codereview.qt-project.org/5553 Reviewed-by: Qt Sanity Bot Reviewed-by: Holger Ihrig Reviewed-by: Matthew Cattell --- tests/auto/qcombobox/qcombobox.pro | 2 -- tests/auto/qcombobox/tst_qcombobox.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/auto/qcombobox/qcombobox.pro b/tests/auto/qcombobox/qcombobox.pro index 18b2826710..7f5b57c237 100644 --- a/tests/auto/qcombobox/qcombobox.pro +++ b/tests/auto/qcombobox/qcombobox.pro @@ -1,5 +1,3 @@ load(qttest_p4) QT += widgets widgets-private gui-private core-private SOURCES += tst_qcombobox.cpp - -CONFIG += insignificant_test # QTBUG-21402 diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index 0444d46a43..5ca2c893c2 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -2476,7 +2476,11 @@ void tst_QComboBox::keyBoardNavigationWithMouse() QSKIP("When calling cursor function, Windows CE responds with: This function is not supported on this system.", SkipAll); #endif - QCursor::setPos(combo.view()->mapToGlobal(combo.view()->rect().center())); + // Force cursor movement to prevent QCursor::setPos() from returning prematurely on QPA: + const QPoint target(combo.view()->mapToGlobal(combo.view()->rect().center())); + QCursor::setPos(QPoint(target.x() + 1, target.y())); + QCursor::setPos(target); + QTest::qWait(200); #define GET_SELECTION(SEL) \ @@ -2487,10 +2491,6 @@ void tst_QComboBox::keyBoardNavigationWithMouse() int selection; GET_SELECTION(selection); -#ifdef Q_WS_QPA - QEXPECT_FAIL("", "QTBUG-20753 QCursor::setPos doesn't work for qpa", Abort); -#endif - //since we moved the mouse is in the middle it should even be around 5; QVERIFY(selection > 3); -- cgit v1.2.3