summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-16 16:32:08 +0200
commit6630937e63ae5797487b86743a7733c8ae5cc42c (patch)
tree3d53dacf6430f9099e1fb20835881205de674961 /tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
parent37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff)
parentc7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff)
Merge commit 'dev' into 'wip/cmake-merge'
Diffstat (limited to 'tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp')
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 943fb997cd..5b4761ba87 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -1671,6 +1671,13 @@ void tst_QComboBox::setCustomModelAndView()
QTRY_VERIFY(combo.view()->isVisible());
const QRect subItemRect = view->visualRect(model->indexFromItem(subItem));
QWidget *window = view->window();
+
+ // QComboBox sometimes ignores the mouse click event for doubleClickInterval
+ // depending on which tests have been run previously. On arm this happens
+ // more often than on x86. Search for maybeIgnoreMouseButtonRelease to see
+ // why this happens.
+ QTest::qWait(QApplication::doubleClickInterval());
+
QTest::mouseClick(window->windowHandle(), Qt::LeftButton, 0, view->mapTo(window, subItemRect.center()));
#ifdef Q_OS_WINRT
QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort);
@@ -3421,6 +3428,11 @@ void tst_QComboBox::task_QTBUG_52027_mapCompleterIndex()
model->setFilterFixedString("foobar1");
completer->setModel(model);
+ if (QGuiApplication::platformName() == "offscreen") {
+ QWARN("Offscreen platform requires explicit activateWindow()");
+ cbox.activateWindow();
+ }
+
QApplication::setActiveWindow(&cbox);
QVERIFY(QTest::qWaitForWindowActive(&cbox));