diff options
author | Jo Asplin <jo.asplin@nokia.com> | 2011-09-26 16:54:50 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-28 01:15:38 +0200 |
commit | 22a83f364e074a56fa21d672bc01f440f833061f (patch) | |
tree | 0a922deb042365a484fdb43c7451836862967cc9 /tests/auto/qcombobox | |
parent | 4bbcbec3fa514ebadfb1cd3826925239598fcaa1 (diff) |
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 <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Diffstat (limited to 'tests/auto/qcombobox')
-rw-r--r-- | tests/auto/qcombobox/qcombobox.pro | 2 | ||||
-rw-r--r-- | 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); |