summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:32:16 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:42:25 +0100
commitfc35f714340d5361231506dfbead132122f59460 (patch)
treefd80498d9417c87b386a011f5849f1e4e48ad3fa /tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
parent6389160f04322449c34bd1ecfe53983e3b588943 (diff)
parent0d990b9ca117514fe83f53b39f25d6272304f2fb (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
Diffstat (limited to 'tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp')
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp11
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 5007983aa6..0873c6bbb1 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();
@@ -2066,9 +2066,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;
@@ -2087,9 +2087,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()