diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-01-29 10:02:38 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-01-29 10:05:01 +0100 |
commit | 55162dae7e5e40bd86b1a6d2c5d5009660159d39 (patch) | |
tree | 30b54dfc19cb83ac0edb795bf206b51edd805c97 /tests/auto/widgets | |
parent | 3527fd62c2705a0292458dd751d9d7f8d4be357f (diff) | |
parent | 6430d6e3ec31afabe0e674397088dd6d9e056195 (diff) |
Merge remote-tracking branch 'origin/5.4.1' into 5.4
Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index ac32ee4968..23d0ffd2d2 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -124,7 +124,7 @@ private slots: void pixmapIcon(); void mouseWheel_data(); void mouseWheel(); - void wheelClosingPopup(); + void popupWheelHandling(); void layoutDirection(); void itemListPosition(); void separatorItem_data(); @@ -2037,9 +2037,9 @@ void tst_QComboBox::mouseWheel() } } -void tst_QComboBox::wheelClosingPopup() +void tst_QComboBox::popupWheelHandling() { - // QTBUG-40656, combo and other popups should close when the main window gets a wheel event. + // QTBUG-40656, QTBUG-42731 combo and other popups should not be affected by wheel events. QScrollArea scrollArea; scrollArea.move(300, 300); QWidget *widget = new QWidget; @@ -2058,9 +2058,12 @@ void tst_QComboBox::wheelClosingPopup() QVERIFY(QTest::qWaitForWindowExposed(&scrollArea)); comboBox->showPopup(); QTRY_VERIFY(comboBox->view() && comboBox->view()->isVisible()); + const QPoint popupPos = comboBox->view()->pos(); QWheelEvent event(QPointF(10, 10), WHEEL_DELTA, Qt::NoButton, Qt::NoModifier); QVERIFY(QCoreApplication::sendEvent(scrollArea.windowHandle(), &event)); - QTRY_VERIFY(!comboBox->view()->isVisible()); + QCoreApplication::processEvents(); + QVERIFY(comboBox->view()->isVisible()); + QCOMPARE(comboBox->view()->pos(), popupPos); } void tst_QComboBox::layoutDirection() |