From 71bd06d516a2410ae0ea698e79dcb94aba9bc5b4 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Wed, 13 Jun 2018 16:35:40 +0300 Subject: Make developer build tests pass for boot2qt Some tests were fixed and others were skipped/blacklisted. Task-number: QTBUG-63152 Change-Id: Ica7df555f8d152ee589865911130525101d4b941 Reviewed-by: Liang Qi --- tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 7c1deb8fff..d5eef521ed 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())); QTRY_COMPARE(combo.currentText(), subItem21Text); } @@ -3436,6 +3443,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)); -- cgit v1.2.3