diff options
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 4 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 4840b75c1b..c97159d4cb 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -3238,6 +3238,9 @@ void QComboBox::keyReleaseEvent(QKeyEvent *e) #ifndef QT_NO_WHEELEVENT void QComboBox::wheelEvent(QWheelEvent *e) { +#ifdef Q_OS_DARWIN + Q_UNUSED(e); +#else Q_D(QComboBox); if (!d->viewContainer()->isVisible()) { int newIndex = currentIndex(); @@ -3258,6 +3261,7 @@ void QComboBox::wheelEvent(QWheelEvent *e) } e->accept(); } +#endif } #endif diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 7824172812..21446de069 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2044,7 +2044,13 @@ void tst_QComboBox::mouseWheel_data() QTest::newRow("upper locked") << disabled << start << wheel << expected; wheel = -1; +#ifdef Q_OS_DARWIN + // on OS X & iOS mouse wheel shall have no effect on combo box + expected = start; +#else + // on other OSes we should jump to next enabled item (no. 5) expected = 5; +#endif QTest::newRow("jump over") << disabled << start << wheel << expected; disabled.clear(); |